build: configure Spotless at top-level only

This commit is contained in:
Harsh Shandilya 2021-08-26 11:24:02 +05:30
parent 03b4e2496a
commit 80fec48ec9
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -23,16 +23,16 @@ group = "dev.msfjarvis.claw"
version = "1.0" version = "1.0"
allprojects { apply(plugin = "com.diffplug.spotless")
apply(plugin = "com.diffplug.spotless")
configure<com.diffplug.gradle.spotless.SpotlessExtension> { configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin { kotlin {
target("**/*.kt") target("**/*.kt")
targetExclude("**/build/**") targetExclude("**/build/**")
ktfmt("0.28").googleStyle() ktfmt("0.28").googleStyle()
} }
kotlinGradle { kotlinGradle {
target("*.gradle.kts") target("**/*.gradle.kts")
ktfmt("0.28").googleStyle() ktfmt("0.28").googleStyle()
} }
format("xml") { format("xml") {
@ -41,7 +41,9 @@ allprojects {
prettier(mapOf("prettier" to "2.0.5", "@prettier/plugin-xml" to "0.13.0")) prettier(mapOf("prettier" to "2.0.5", "@prettier/plugin-xml" to "0.13.0"))
.config(mapOf("parser" to "xml", "tabWidth" to 2)) .config(mapOf("parser" to "xml", "tabWidth" to 2))
} }
} }
allprojects {
tasks.withType<KotlinCompile>().configureEach { tasks.withType<KotlinCompile>().configureEach {
kotlinOptions { kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString() jvmTarget = JavaVersion.VERSION_11.toString()