Skip to content

Instantly share code, notes, and snippets.

@Vandalko
Created July 30, 2017 21:41
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 Vandalko/054127135b591a9ee5e2e9bdf06efe75 to your computer and use it in GitHub Desktop.
Save Vandalko/054127135b591a9ee5e2e9bdf06efe75 to your computer and use it in GitHub Desktop.
Prints name and class of each executed task.
// Example use: gradle -I init.gradle clean assembleDebug
useLogger(new CustomEventLogger())
class CustomEventLogger extends BuildAdapter implements TaskExecutionListener {
public void beforeExecute(Task task) {
println task + " " + task.class
}
public void afterExecute(Task task, TaskState state) {
}
public void buildFinished(BuildResult result) {
println 'build completed'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment