Hi dear community,
I try to migrate my project to gradle 9.
I have tried several versions of the sonar plugin :
-
6.2.0.5505 (Version that worked before the migration) -
7.2.3.7755 (The last one)
But with thoses two version I get the same error whatever I run the task “sonar” or "the deprecated one “sonarqube” :
Could not determine the dependencies of task ‘:mymodule:sonarqube’.
Extension of type ‘LibraryExtension’ does not exist. Currently registered extension types: [ExtraPropertiesExtension, LibrariesForLibs, LibrariesForVersionCatalog, VersionCatalogsExtension, BasePluginExtension, SourceSetContainer, ReportingExtension, JavaToolchainService, JavaPluginExtension, KotlinAndroidProjectExtension, LibraryExtensionImpl, LibraryAndroidComponentsExtension, LintLifecycleExtension, ComposeCompilerGradlePluginExtension, KspExtension, JacocoPluginExtension, AxolotlSonarExt, ScreenshotTestOptionsImpl, SonarExtension, SonarExtension]
It might be an incompatibility issue between sonar plugin and gradle 9.
Could you check ?
Thank you for your help.
Edit : By navigating into the topics, I see many post on gradle 9 troubleshooting.
I have tried android.newDsl = false but I get another error also already posted in the topics :
Unable to find method ‘‘java.util.Collection com.android.builder.model.SourceProvider.getCDirectories()’’
‘java.util.Collection com.android.builder.model.SourceProvider.getCDirectories()’