task A << {
println 'Hello from A'
}
task B << {
println 'Hello from B'
}
B.mustRunAfter A
The B.mustRunAfter A line tells Gradle to run task after task specified as an argument.
And the output is:
> gradle -q B A
Hello from A
Hello from B
The ordering rule d...