Created
February 23, 2016 11:21
-
-
Save kdabir/5218fe2ffe94b69bf088 to your computer and use it in GitHub Desktop.
When a task must always execute!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task someTask << { | |
println 'A task that will fail' | |
throw new RuntimeException() | |
} | |
task cleanup << { | |
println 'Will perform cleanup no matter what' | |
} | |
someTask.finalizedBy cleanup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment