Skip to content

Commit d04361c

Browse files
authored
Explicitly disable dev/prod tasks based on flag (#3358)
1 parent 7be2496 commit d04361c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

solr/ui/build.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,21 @@ tasks.matching { task ->
176176
// and you will see the test tasks being listed there as well, but they will be skipped as
177177
// expected
178178
}
179+
180+
// Explicitly enable or disable development tasks based on the build variant
181+
// This prevents any invalid task dependencies on assemble task execution
182+
tasks.matching {
183+
val taskName = it.name.lowercase()
184+
taskName.contains("wasmjs") && taskName.contains("development")
185+
}.configureEach {
186+
onlyIf { rootProject.ext["development"] as Boolean }
187+
}
188+
189+
// Explicitly enable or disable production tasks based on the build variant
190+
// This prevents any invalid task dependencies on assemble task execution
191+
tasks.matching {
192+
val taskName = it.name.lowercase()
193+
taskName.contains("wasmjs") && taskName.contains("production")
194+
}.configureEach {
195+
onlyIf { !(rootProject.ext["development"] as Boolean) }
196+
}

0 commit comments

Comments
 (0)