我有一个多项目和build.gradle
configure(subprojects) {
task buildAndCopyJar(dependsOn: build, type: Copy) {
from "build/libs"
into "../hotpot-jars/${bootJar.baseName}"
include "*.jar"
}
task deploy(dependsOn: buildAndCopyJar, type: Exec) {
commandLine "${rootProject.projectDir}/hotpot-jars/deploy.sh"
}
}
现在buildAndCopyJar
任务将为每个子项目运行,并且deploy
任务将在每个buildAndCopyJar
任务结束时运行。我想在完成所有{strong>所有任务后运行deploy
任务,最后一次运行一次buildAndCopyJar
任务。我该如何处理这种情况?