Q:

Add same task dependency to multiple tasks in Gradle

I'd like to add dependency on TaskX to multiple other tasks.
TaskA.dependsOn TaskX
TaskB.dependsOn TaskX
TaskC.dependsOn TaskX
TaskD.dependsOn TaskX

Is it possible to set it all in one call only, i.e. use a Task collection and add dependency to it?

A:

I would assume it would be:
[TaskA, TaskB, TaskC, TaskD]*.dependsOn TaskX

