Sonarqube Gradle plugin with included builds

Hello Angelo and thank you for the welcome as well as the response.

To add a bit more context, the project in question that we’d like to analyze is a giant Java project. This used to be a maven project for which we had the sonar scanner running properly. But the past few years we made the switch to Gradle which got us in a pickle.

I’ve tried setting the sonar.gradle.scanAll property to true and for the test project this seems to do what we would like to see, albeit with more files than only our JVM related files.

Setting it on our intended project seems to introduce a bunch of memory and potentially network related issues due to the sheer size of the project. It having to handle more files than only our Java files, reading and processing them seems to be quite the struggle.
I’m also not sure that this wouldn’t create a mess in the SonarQube project.

The original problem is that when not running with the scanAll property, only the top level build is processed on the instance. (e.g. for the test project this would only be “src/main/java/sonartest” instead of all the other included builds.) But we would like to have it show all modules/directories and not only the top level.

1 Like