Skip to content

Instantly share code, notes, and snippets.

@bodiam
Last active December 19, 2015 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bodiam/5999047 to your computer and use it in GitHub Desktop.
Save bodiam/5999047 to your computer and use it in GitHub Desktop.
Marcin is a crazy fish.
def artifacts = []
addListener(new TaskExecutionAdapter() {
void afterExecute(Task task, TaskState state) {
if(task in AbstractArchiveTask) {
artifacts << task.outputs.files.singleFile
}
}
})
addBuildListener(new BuildAdapter() {
void buildFinished(BuildResult result) {
if(artifacts) {
println "\nOutput location: ${artifacts.last()}\n"
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment