Skip to content

Instantly share code, notes, and snippets.

@martijndwars
Last active January 23, 2019 11:16
Show Gist options
  • Save martijndwars/a48d93a709e59107104d7c9a7819c427 to your computer and use it in GitHub Desktop.
Save martijndwars/a48d93a709e59107104d7c9a7819c427 to your computer and use it in GitHub Desktop.
Gradle incrementality/task dependency example
task C {
doLast {
println("Do C")
}
}
task A(dependsOn: C) {
doLast {
println("Do A")
}
}
task B(dependsOn: C) {
doLast {
println("Do B")
}
}
> gradle :A :B --info
> Task :C
Task ':C' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Custom actions are attached to task ':C'.
Do C
:C (Thread[Execution worker for ':',5,main]) completed. Took 0.008 secs.
:A (Thread[Execution worker for ':',5,main]) started.
> Task :A
Task ':A' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Custom actions are attached to task ':A'.
Do A
:A (Thread[Execution worker for ':',5,main]) completed. Took 0.001 secs.
:B (Thread[Execution worker for ':',5,main]) started.
> Task :B
Task ':B' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Custom actions are attached to task ':B'.
Do B
:B (Thread[Execution worker for ':',5,main]) completed. Took 0.001 secs.
BUILD SUCCESSFUL in 0s
3 actionable tasks: 3 executed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment