23 lines
653 B
Kotlin
23 lines
653 B
Kotlin
plugins {
|
|
id("com.diffplug.spotless") version "6.25.0"
|
|
id("maven-publish")
|
|
}
|
|
|
|
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", "buildSrc/build/kotlin-dsl/**/*.kts")
|
|
// by default the target is every ".kt" and ".kts` file in the java sourcesets
|
|
ktfmt() // intellij plugin available
|
|
}
|
|
}
|