Created
June 30, 2015 14:46
-
-
Save huxi/3e4ddb7d6c3b5666fb9c to your computer and use it in GitHub Desktop.
Simple Gradle build listener to print a "Finished at: " similarly to Maven after the build has finished. Put this file into the ~/.gradle/init.d directory.
This file contains hidden or 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
import org.gradle.BuildAdapter | |
import java.text.SimpleDateFormat | |
class FinishedAtBuildListener extends BuildAdapter { | |
private SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS") | |
void buildFinished(BuildResult result) { | |
println "Finished at: "+formatter.format(new Date()) | |
} | |
} | |
gradle.addListener(new FinishedAtBuildListener()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment