I have these tasks in a multi-project build:
task runA(type: GradleBuild) {
tasks = [
':a:x:bootRun',
':a:y:bootRun',
':c:x:bootRun'
]
}
task runB(type: GradleBuild) {
tasks = [
':b:x:bootRun',
':b:y:bootRun',
':c:x:bootRun'
]
}
Each :a:x
etc. is a separate project (build.gradle
/ build.gradle.kts
file). When I invoke gradle runA
or gradle runB
all of the subtasks are run in parallel just as they should.
However, when I run gradle runA runB
only some of the tasks get invoked
while I want all five unique tasks a:x a:y c:x b:x b:y
to be run in parallel. I have also tried using dependsOn
instead of the GradleBuild
task type but that leads to the same outcome (usually only 4 of 5 expected tasks run in parallel).
Note that the tasks never "complete" as they run an application, I'm more or less abusing gradle as a launcher of sorts here. I assume gradle blocks and waits for one of the tasks to complete but there are no dependencies between them.
What do I need to do to force gradle to run all of the tasks in parallel at the same time?