Using the announce / build-announcements plugin results in build error if it fails. Why?

I just tried the new (available with M6) build-announcements plugin. Works like I always had expected the announce plugin to work, but if I don’t have the notify-send thingy installed on Ubuntu, my build will fail.

I would expect it not to fail just because the notification couldnt be sent to my desktop. I dont want to use the --continue flag for this either as it is quite general.

Am I missing something?

No, it’s a bug. I’ve added GRADLE-1922 for this.

This should be fixed in the new snapshot. Could you give it a try?


Will give it a shot tomorrow. Thanks.

Works… (tested w & w/o installed notifiy-bin)

Ok, I got it again, this time when using gradle (m6/7) with Jenkins (as user jenkins) which most likely lacks some system gtk requirements and causes the build to succeed with a failure, which is quite inconvenient as jenkins will recognize this as failed built…

16:14:14.892 [DEBUG] [org.gradle.process.internal.ProcessBuilderFactory] creating process builder for command ‘/usr/bin/notify-send’ 16:14:14.892 [DEBUG] [org.gradle.process.internal.ProcessBuilderFactory] in directory /var/lib/jenkins/workspace/mopay20 16:14:14.893 [DEBUG] [org.gradle.process.internal.ProcessBuilderFactory] with argument#0 = Build successful 16:14:14.893 [DEBUG] [org.gradle.process.internal.ProcessBuilderFactory] with argument#1 = 12 tasks executed 16:14:14.926 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Started command ‘/usr/bin/notify-send’. 16:14:14.975 [ERROR] [system.err]

16:14:14.976 [ERROR] [system.err] GLib-GObject-CRITICAL **: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed 16:14:14.976 [ERROR] [system.err] aborting… 16:14:14.976 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process finished for command ‘/usr/bin/notify-send’. 16:14:14.982 [ERROR] [org.gradle.BuildExceptionReporter]

16:14:14.982 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.