Sonar Task Failed due to could not determine the dependencies of task ':app:sonar'


> Could not determine the dependencies of task ':app:sonar'. > > \> Extension of type 'AppExtension' does not exist. Currently registered extension types: [ExtraPropertiesExtension, LibrariesForLibs, VersionCatalogsExtension, BasePluginExtension, SourceSetContainer, ReportingExtension, JavaToolchainService, JavaPluginExtension, KotlinAndroidProjectExtension, ApplicationExtension, ApplicationAndroidComponentsExtension, LintLifecycleExtension, HiltExtension, KspExtension, GoogleServicesPlugin.GoogleServicesPluginConfig, SonarExtension, SonarExtension]

When set, then another error

android.newDsl=false

More info

App level build.gradle.kts

...
plugins { id("org.sonarqube") version "7.2.3.7755" }
sonar {
    properties {
        property("sonar.projectKey", "abc")
        property("sonar.projectName", "proj")
        property("sonar.organization", "org")
    }
}
android {
...
//    compileSdk { version = release(36) { minorApiLevel = 1 } }
    compileSdk = 36
...
}
...

AGP, Kotlin, ksp and gradle wrapper versions

agp = "9.0.0"
kotlin = "2.3.10"
ksp = "2.3.5"

...
services.gradle.org/distributions/gradle-9.2.1-bin.zip

Haw to fix or any workaround to integrate and run SonarQube in Github Actions?

1
Apr 3 at 10:14 AM
User AvatarQamar
#android#gradle#sonarqube#gradle-kotlin-dsl

No answer found for this question yet.