我的任务看起来像这样,我的构建类型为assembleDebugDaily。我正在尝试运行Task dailyCiBuild
task versionGitTagBuild() {
doLast {
println "Versioning git tag build finished"
}
}
task zipAlignAPK(){
doLast{
println "ZipAlign Completed"
}
}
tasks.whenTaskAdded { task ->
if (task.name == 'assembleDebugDaily') {
task.mustRunAfter versionGitTagBuild //*This line is the problem*
zipAlignAPK.dependsOn(task)
}
}
task copyToBuildShare(){
dependsOn zipAlignAPK
doLast {
println("Finished")
}
}
task dailyCiBuild(){
dependsOn copyToBuildShare
doLast{
println "CI Build Finished"
}
}
它总是导致stackOverflow错误。如果我删除上面指示的行。它成功构建。我做错了什么以及如何实现上述功能?