Skip to content

Instantly share code, notes, and snippets.

View efwe's full-sized avatar
🏠
Working from home

frank waldheim efwe

🏠
Working from home
View GitHub Profile
@efwe
efwe / init.gradle
Created June 19, 2012 11:15 — forked from cybo42/init.gradle
Gradle Growl Notifications
// File: ~/.gradle/init.gradle
class GrowlNotifyListener extends BuildAdapter {
void buildFinished(BuildResult result) {
def projectName = result?.gradle?.rootProject?.project?.name
// skip buildSrc
if (!projectName.equals("buildSrc")) {
if (result.failure) {
growlNotify "Gradle [$projectName]: failure", result.failure.message, true
} else {
growlNotify "Gradle [$projectName]: finished", 'Build successful'