Last active
January 23, 2019 11:16
-
-
Save martijndwars/a48d93a709e59107104d7c9a7819c427 to your computer and use it in GitHub Desktop.
Gradle incrementality/task dependency example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task C { | |
doLast { | |
println("Do C") | |
} | |
} | |
task A(dependsOn: C) { | |
doLast { | |
println("Do A") | |
} | |
} | |
task B(dependsOn: C) { | |
doLast { | |
println("Do B") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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