Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

build: Exclude :solr:ui: (Kotlin multiplatform) tests on -x test (#3184)

Christos Malliaridisbdaf8a1dc748
diff --git a/solr/ui/build.gradle.kts b/solr/ui/build.gradle.kts
index ef110a296a5..f7231822281 100644
--- a/solr/ui/build.gradle.kts
+++ b/solr/ui/build.gradle.kts
@@ -167,3 +167,20 @@ compose.desktop {
}
}
}
+
+tasks.matching { task ->
+ task.name in listOf(
+ "allTests",
+ "desktopTest",
+ "wasmJsTest",
+ "wasmJsBrowserTest",
+ )
+}.configureEach {
+ // These kotlin multiplatform test tasks are not excluded on "gradlew ... -x test",
+ // so we disable them explicitly
+ onlyIf { !gradle.startParameter.excludedTaskNames.contains("test") }
+
+ // Note that "gradlew check -x test --dry-run" does not correctly resolve this exclusion rule,
+ // and you will see the test tasks being listed there as well, but they will be skipped as
+ // expected
+}