thinuwan thinuwan - 1 year ago 213
Android Question

SonarQube - Android not working for gradle 3.0.0

Android sonarqube worked until I updating android studio. Now it gives an error

FAILURE: Build failed with an exception.

* What went wrong:
com.android.build.gradle.api.ApkVariant.getCompileLibraries()Ljava/util/Collection;


I think this happens because gradle dependency syntax changed from 'compile' to 'implementation' like below in newest android version.

from

dependencies {
compile ........
compile ........
}


to

dependencies {
implementation ........
implementation ........
}


Can anyone please help me to configure sonarqube for new android version

Answer Source

I've performed some researches:

  • here you can find the current issue tracked internally by SonarQube (which status is not fixed)

  • here you can find the issue opened by a SonarQube developer asking Google about the API change. As stated by Google engineers this change is intended and an alternative API already exists. SonarQube stated they won't support android plugin 3.0.0 until the final release or at least RC version

Result:

To continue to work you are forced to build your project with the current stable Android Studio and Android plugin v2.X.X

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download