Gradle 2.4 fails with "Failed to notify build listener.", where Gradle 2.3 successfully builds

My build.gradle leads to the following output when running on Gradle 2.4 (Mac, Java 8):

(settings.gradle) initialization
(top-level build.gradle) initialization
compiling with Java 1.8.0 to language level 7
building project version 0.8.0
(configuration of subproject HtmlSanityCheck-core)
(configuration of subproject HtmlSanityCheck-gradle-plugin)
(configuration of subproject documentation)
FAILURE: Build failed with an exception.
* What went wrong: 
Failed to notify build listener.

With Gradle 2.3, build works fine :frowning:

The project
(btw planned to be a gradle-plugin, supporting asciidoctor documentation…)

thx for your great work!

Hey Gernot,
what task do you invoke on your build?

I can reproduce this issue. Running “gradle build” with gradle 2.4 throws a nullpointer. Investigating…

The issue you’re seeing comes from the bintray plugin you’re using which is not compliant with gradle 2.4. @Luke already provided a fix for this to the bintray team (see but they havn’t released an updated version yet, that contains this fix.

Based on their commit list it looks like it has been released with plugin version 1.2.

thx guys…

For me it fails with every gradle task…

if I upgrade to


I still get a:

java.lang.NullPointerException (no error message)

Since it is failing during configuration phase, the tasks you invoke
doesn’t matter. I can see that it is also failing with
com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2 but unfortunately
it is hard to see what the root cause is because there is not tag
associated with 1.2 in there git repo. also when checking out this

the stacktrace you get when running gradle build --stacktrace points
to BintrayPlugin.groovy:91 calling Task#dependsOn, which is
definitely not what you see here:

My best guess is something went wrong with the 1.2 release and Lukes fix
didn’t make it into that release. I’ll reach out to bintray to get more insights on this.

@Gernot_Starke I’ve figured out what’s going wrong with your build.

In your build you have separated buildscript sections to declare your plugin dependencies. The problem is nu.studer:gradle-plugindev-plugin:1.0.3 drags in an old version of the bintray plugin. This is fine if you have explicitly listed that plugin as dependency on your own (as you’ve done in your core project). Here the conflict resolution kicks in and the higher version is used. But you’re also using the nu.studer:gradle-plugindev-plugin:1.0.3 dependency in your gradle-plugin subproject. There the transitive dependency of bintray plugin version 0.6 is resolved which breaks your build.

Personally I would change your buildscript setup to have only one buildscript block on your rootproject. This is shared among all your subprojects but way easier to maintain. That should also fix your issue as you only have one classpath for your build that contains the bintray plugin 1.2.
Alternatively you can exclude the transitive bintray dependency when declaring the nu.studer:gradle-plugindev-plugin:1.0.3 dependency.

hope that helped.


thx René, nice that you care about my issue…

seems my various root- and subproject buildscripts are
a big mess :frowning:

greetings from Cologne,