From 62fbe9560a401bb7a5a4ddd85af16a108eb03c0a Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Sat, 26 Sep 2026 20:28:18 +0000 Subject: [PATCH] fix(konsist): anchor the scanned-source inputs at the source roots (#7382) --- core/konsist/build.gradle.kts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/konsist/build.gradle.kts b/core/konsist/build.gradle.kts index 08988f587a..d374c48e41 100644 --- a/core/konsist/build.gradle.kts +++ b/core/konsist/build.gradle.kts @@ -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("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") }