1

I am migration from Gradle 4.x to 6.x.

Currently I create in the execution phase many dynamic tasks with data from previous steps of the build. The tasks can't be define in the definition phase. If I would create all possible task in the definition phase this would need hours and the execution would run in seconds.

In Gradle 4.x I have execute this tasks with foo.execute() immediately. This is not possible with Gradle 6.x anymore. What is the best replacement for it?

Is ist possible to add dependencies in the execution phase? Also in future versions? I thing on a structure like:

task taskFactory {
   DynamicTask dt = new DynamicTask()
   mainTask.dependsOn dt
   ...
}
task mainTask(dependsOn taskFactory) {
   ...
}

Or is there a phase between definition phase and execution phase?

Horcrux7
  • 23,758
  • 21
  • 98
  • 156

0 Answers0