home.


Tagged: gradle-task-dependency


Gradle: Add a task dependency

If you already have a task – test for example – and you want to make that depend on a task you’ve written you can do the following:

task myTask() {
  // blar
}

test.dependsOn myTask

‘gradle test’ will look like

...
:myTask
:compileTestJava
:processTestResources
:testClasses
:test
...
gradle gradle-task-dependency

Page 1 of 1