我是gradle的新手,我有一个场景,我需要在gradle的单个任务中执行2个Shell脚本。
我尝试了以下操作,但未执行script1.sh任务。
task downloadtheArtifacts(type: Exec) {
commandLine './script1.sh'
commandLine './script2.sh'
}
请让我知道我该如何解决?
最佳答案
尝试:
task downloadtheArtifacts {
doLast {
exec {
commandLine './script1.sh'
}
exec {
commandLine './script2.sh'
}
}
}
关于java - 如何在Gradle文件中的任务中执行多个Shell脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53499568/