I think we check if tasks have overlapping output directories and won’t run them in parallel if they do. So you could try having a dummy output directory that’s shared by all tasks that shouldn’t run in parallel. We also won’t run tasks that are in the same project in parallel (this will eventually change).
Setting org.gradle.parallel=false
after task execution has started won’t turn off parallel execution.
You could also look at the mustRunAfter
methods on Task. You could then setup the tasks to run in a particular order, but not require all of them to run (like dependsOn
would).