Sonar Task Failed due to could not determine the dependencies of task ':app:sonar'
04:18 03 Apr 2026

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 and gradle wrapper

    agp = "9.0.0"
...
services.gradle.org/distributions/gradle-9.2.1-bin.zip

Kindly share fix or anyworkaround to integrate and run SonarQube in Github Actions!

android gradle sonarqube gradle-kotlin-dsl