Support modularised projects for code coverage (Android)

Nowadays, it is modern to modularise projects in order to speed up their build time. But since sonar does not support this modularised approach, all tests for all modules must be run in order to correctly calculate the estimated code coverage.

How I imagine this working is that the server version knows the current code coverage for each module separately (we have the sonar properties set for each module). When only one module is changed, the code coverage might be updated only for that module.
And for the rest of the modules, the coverage could be taken from the latest server version - nothing has changed in those modules, so nothing needs to be recalculated there.

Hello @Vanda_Cabanova,

The concept of Module was removed from SonarQube a couple of years ago (

I think we should try to see if there are options on the coverage tool side to match your use case.
SonarQube just load what you provide and is not aware about which tests were executed or not.

If I understand correctly what you said, instead of running your entire build+tests of your project, your build pipeline just execute the build+tests of the modules that were changed. As a consequence, only the coverage data of these modules are computed and so only these data are sent to SonarQube.
If I’m correct, what I would suggest is to look for an option to save the coverage data in the repository along with the code. This way, if no code is changed, no build+tests will be triggered, so the coverage data will stay the same.