BuildLauncher API Exception is driving me mad

Hi There,

Apologies for the title, but it is literally what’s happening to me right now: we are maintaining a legacy repository and we are trying to make the most out of it, updating all outdated dependencies and so on.

All of a sudden we started getting this exception:

> The version of Gradle you are using\\
(Gradle distribution 'https://services.gradle.org/distributions/gradle-7.6-milestone-1-all.zip')\\
does not support the BuildLauncher API.\\
Support for this is available in Gradle 1.2 and all later versions.

Oddly, the very same commit was just built fine the day before. We are experiencing the same issue with any Gradle version (including 8.2.1).

The issue is related to our SonarCloud integration, while I can run the same task just fine locally.

The error message itself is super vague and there is only 3 Chinese results in Google for it.

Hoping that someone could point me in the right direction with this.

Thanks!

Can you show a build --scan? Optimally of one that works and one that fails.

Hi @Vampire,
thank you for your reply, I’m looking into this, however, getting a proper scan seems to be also challenging, as I’m getting this:

An exception occurred applying plugin request [id: 'com.gradle.build-scan', version: '3.14']
> Failed to apply plugin 'com.gradle.build-scan'.
   > The build scan plugin is not compatible with Gradle 6.0 and later.
     Please use the Gradle Enterprise plugin instead.

Can you please advise?

Thanks!

Hi @Vampire,

Never mind, I figured it out, let me share the two scans with you:

Hope it can help identifying the issue :crossed_fingers:

Thanks,
Adam

The issue is related to the most recent Sonar plugin. Problem is gone with the first 4.x version.

1 Like