Q: Trigger a gradle task after ctrl-c ./gradlew bootRun I'm trying to remove docker containers when ./gradlew bootRun receives a ctrl-c exit in the terminal.
My bootRun configuration:
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
}

Task list:
$ ./gradlew bootrun -m
:compileJava SKIPPED
:generateGitProperties SKIPPED
:processResources SKIPPED
:classes SKIPPED
:composeUp SKIPPED
:findMainClass SKIPPED
:pathingJar SKIPPED
:bootRun SKIPPED
:composeDown SKIPPED

Was hoping that ignoreExitValue would cause gradle to move on to its next task when issuing a ctrl-c; however, this did not work.
How can I force gradle to run composeDown?
