Gradle project detected. You should use the SonarQube plugin for Gradle during build rather than using this GitHub Action.
Summary
We don’t want to use the SonarQube plugin for Gradle because we have a multi-language repository and we want to scan everything in the repository not just the Gradle applications.
As mentioned in the thread above, it should be tried to exclude the build.grade file in the sonar-project.properties file.
I have tried this with all possible exclusion variations, but still get the same error.
I added “sonar.sources=.” to the sonar-project.properties file, but it still doesn’t work.
I still get the error: “Gradle project detected. You should use the SonarQube plugin for Gradle during build rather than using this GitHub Action.”
Maybe you misunderstood me. I want to use the SonarCloud Github action and not the Gradle plugin. But when i try to use the github action it finds the grade.build file, it fails and suggests me to use the gradle plugin. As I understood I need to exclude the file build.gradle in the Sonarcloud properties file that is called from the Github action job. I have already done that but the github action still detects it.
I can’t tell you how to change the behavior of the action. It’s refusing to run and telling you to use SonarScanner for Gradle. So that’s what you need to do. I was trying to help you accomplish the underlying goal of analyzing all the files.
In the end, all the scanner implementations call the same underlying executable.