fix(konsist): anchor the scanned-source inputs at the source roots (#7382)

This commit is contained in:
James Rich authored and GitHub committed 2026-09-26 20:28:18 +00:00
1 parent ee931bd1a2
commit 62fbe9560a
1 file changed
+4 -6
+4 -6
View File
@@ -37,18 +37,16 @@ kotlin {
}
}
// The rules read every module's source from disk, which Gradle cannot see, so declare it or the task stays
// up to date (and replays from cache) while the code it guards changes.
// Konsist reads every `.kt` in the checkout from disk, which Gradle cannot see. The patterns are anchored at the
// source roots because a leading `**` also claims the directories other tasks write, such as the docs sync targets.
tasks.named<Test>("jvmTest") {
inputs
.files(
fileTree(isolated.rootProject.projectDirectory) {
include("**/*.kt", "**/*.kts")
exclude("**/build/**", "**/.gradle/**", "**/.kotlin/**", ".claude/**", "**/node_modules/**")
include("*/src/*/kotlin/**/*.kt", "*/*/src/*/kotlin/**/*.kt", "config/spotless/*.kt")
exclude("**/build/**")
},
)
.withPathSensitivity(PathSensitivity.RELATIVE)
.withPropertyName("konsistScannedSources")
// Gradle checks overlap against the tree root, so the include filter does not hide these outputs under src/.
mustRunAfter(":feature:docs:syncDocsToComposeResources", ":feature:docs:syncTranslatedDocsToComposeResources")
}