Hello I am trying to add Sonar Gradle plugin in Android project. I add it in root build.gradle.kt file as per documentation here SonarScanner for Gradle
Unfortunately, I am not able to reproduce the issue you are seeing. I do not see the sonarqube version declared in your versions catalog example, could this be the issue?
If not, it would greatly help if you could create a small reproducer project that demonstrates the issue, such that I can investigate further.
I’ve had a look at your project and noticed that the Sonar plugin is never actually applied to the project. This causes the sonar config block to not be recognized. You can remove the apply false after the Sonar plugin declaration and it should recognize the sonar block.
If you are using the apply false to avoid applying the sonar plugin in all subprojects, you will instead need to apply it in the subprojects you do want to run the sonar analysis. If you don’t want to do this manually for each submodule, you can look into the subprojects and allprojects blocks.
Thanks for the feedback, that might indeed be something to update in the documentation. Could you give me a link to the documentation that contains the apply false, so that I can have a look into updating it?
Documentation only mentions id("org.sonarqube").version("4.4.1.3373"), but given in our project we already using Gradle version catalogue I automatically assumed that it should be translated as alias(libs.plugins.sonarqube) apply false