Skip to content

Instantly share code, notes, and snippets.

@gki
Created October 2, 2015 04:45
Show Gist options
  • Save gki/e610babd2c833ba83c3a to your computer and use it in GitHub Desktop.
Save gki/e610babd2c833ba83c3a to your computer and use it in GitHub Desktop.
[Gradle] add pre-action, post-action
task mytask {
doFirst {
println "doFirst"
}
}
mytask.doLast {
println "doLast"
}
mytask << {
println "doLast by <<" // this is same as mytask.doLast {}
}
// add action to existing task
check.doFirst {
println "doFirst for check!"
}
check.doLast {
println "doLast for check!"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment