Closed forming closed 5 years ago
Thanks for opening an issue. This is expected behavior, as stated in the documentation. Please call the plugin separately for each module.
Each time the task is being executed SonarQube assumes the report is for the whole project itself, so by running modules separately the data/charts are being distorted.
Currently, the plugin treats each module as a separate Sonarqube project, and gathering several Gradle modules in a single Sonarqube project is not supported. Do you think that would be a valuable feature?
Ah, you're right, I was using the same applicationId
and packageName
when running modules separately.
I think it would be valuable, currently, you have to make do with a couple if not dozens of separate Sonarqube projects (for a larger Android project). It would be much easier to track progress and overall project state if the modules reports were aggregated to a single project.
I have integrated this in a project with 10 modules and I agree that it's easier if all of them go to a single Sonarqube project. If there is a single team working on the project, it's valuable.
However, if there are multiple teams taking care of the modules individually, then this sort of separation might be even valuable.
Thanks for your input, I am going to investigate how to combine multiple Gradle modules in a single Sonarqube project.
My project has multiple modules, when running the modules separately, e.g
./gradlew app-models:androidAnalyzer
seems to work fine.But when I try to run
./gradlew androidAnalyzer
The
sonarqube
fails and I receive an error:Not authorized. Please check the properties sonar.login and sonar.password.