build: switch to spotless (#355)

* build: switch to spotless

add in some other basic formatting steps that allow for easy
auto-correction

* build: lint text files as well

* chore: remove license headers from package-info files

spotless can't verify these
This commit is contained in:
zml 2022-05-23 23:23:09 -07:00 committed by Jason
parent cc7793925d
commit ed7b7569a8
77 changed files with 81 additions and 1545 deletions

View file

@ -1,6 +1,6 @@
plugins {
`kotlin-dsl`
id("org.jlleitschuh.gradle.ktlint")
id("com.diffplug.spotless")
}
repositories {
@ -15,8 +15,14 @@ dependencies {
implementation(libs.licenser)
implementation(libs.gradleKotlinJvm)
implementation(libs.gradleDokka)
implementation(libs.gradleKtlint)
implementation(libs.spotless)
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}
spotless {
kotlin {
ktlint()
}
}