build: Configure task rules for multiproject builds

This commit is contained in:
Siphalor committed 2026-11-15 21:57:52 +01:00
1 parent fddca3ffd4
commit 4976602a68
5 files changed
+46 -12

No files matched your search

@@ -0,0 +1,16 @@
listOf("compileJava", "assemble", "test", "build", "publish").forEach {
tasks.register(it) {
description = "Composite task for $this"
dependsOn(getTasksByName(it, true).filter { t -> t != this })
}
}
tasks.addRule("All subproject tasks are available as composite tasks running across all subprojects") {
val subProjectTasks = getTasksByName(this, true)
if (subProjectTasks.isNotEmpty()) {
tasks.register(this) {
description = "composite task for $this"
dependsOn(subProjectTasks)
}
}
}