我在./gradlew bootRun
收到终端中的ctrl-c出口时尝试删除docker容器。
我的bootRun配置:
bootRun {
systemProperties = System.properties
dependsOn pathingJar
doFirst {
classpath = files("$buildDir/classes/main", "$buildDir/resources/main", pathingJar.archivePath)
}
ignoreExitValue true // what I was hoping would work
}
任务清单:
$ ./gradlew bootrun -m
:compileJava SKIPPED
:generateGitProperties SKIPPED
:processResources SKIPPED
:classes SKIPPED
:composeUp SKIPPED
:findMainClass SKIPPED
:pathingJar SKIPPED
:bootRun SKIPPED
:composeDown SKIPPED
当发出ctrl-c时,希望ignoreExitValue
会导致gradle继续执行下一个任务;但是,这不起作用。
如何强制gradle运行composeDown?