From my testing, both
task taskA {
doFirst {
println("$name first")
}
doLast {
println("$name second")
}
}
and
task taskB {
doLast {
println("$name first")
println("$name second")
}
}
executes in the same order.
What is the significance of having a separate doFirst
block? Can something else happen between the execution of doFirst
and doLast
?
I have gone through the gradle docs section on tasks. The examples also seem to use just doLast