diff --git a/buildSrc/src/main/kotlin/mihon.code.lint.gradle.kts b/buildSrc/src/main/kotlin/mihon.code.lint.gradle.kts index 9dfa7eef2..3e604c8c0 100644 --- a/buildSrc/src/main/kotlin/mihon.code.lint.gradle.kts +++ b/buildSrc/src/main/kotlin/mihon.code.lint.gradle.kts @@ -6,6 +6,18 @@ plugins { val libs = the() +val xmlFormatExclude = buildList(2) { + add("**/build/**/*.xml") + + projectDir + .resolve("src/commonMain/moko-resources") + .takeIf { it.isDirectory } + ?.let(::fileTree) + ?.matching { exclude("/base/**") } + ?.let(::add) +} + .toTypedArray() + spotless { kotlin { target("**/*.kt", "**/*.kts") @@ -23,7 +35,7 @@ spotless { } format("xml") { target("**/*.xml") - targetExclude("**/build/**/*.xml") + targetExclude(*xmlFormatExclude) trimTrailingWhitespace() endWithNewline() }