Statt
1 2 3 |
task foo(dependsOn: [bar1, bar2, bar3]) { // ... } |
besser:
1 2 3 4 5 6 7 8 9 |
task foo() { def tasks = [bar1, bar2, bar3] for (int i = 0; i < tasks.size() - 1; i++) { tasks[i + 1].mustRunAfter(tasks[i]) } dependsOn(tasks) // ... } |