如果我运行,以下内容是否总是one, two, three
按顺序打印gradle three
?
task one {
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(it)) {
println "one"
}
}
}
task two {
dependsOn one
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(it)) {
println "two"
}
}
}
task three {
dependsOn two
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(it)) {
println "three"
}
}
}