20 lines
591 B
Kotlin
20 lines
591 B
Kotlin
plugins { id("com.diffplug.spotless") version "6.22.0" }
|
|
|
|
repositories { mavenCentral() }
|
|
|
|
spotless {
|
|
encoding("UTF-8")
|
|
java {
|
|
target("**/*.java")
|
|
toggleOffOn("formatter:off", "formatter:on") // same as intellij
|
|
targetExclude("build/generated/**", "build/generated-async-api/**")
|
|
palantirJavaFormat() // Intellij Plugin available
|
|
}
|
|
kotlin {
|
|
target("**/*.kt", "**/*.kts")
|
|
targetExclude("buildSrc/build/generated-sources/**/*.kt")
|
|
// by default the target is every ".kt" and ".kts` file in the java sourcesets
|
|
ktfmt() // intellij plugin available
|
|
}
|
|
}
|