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.