Hi everyone!
I recently realized that Sonar keeps some cache in the home folder ~/.sonar/cache
.
After inspection, I noticed that it has multiple folders ranging a few kbs to ~50 mb, containing the sonar plugin jar for different languages (example: sonar-kotlin-plugin.jar
), all adding up to over 300 mb.
It’s not much, but I was quite surprised to find dozens of languages that are not part of the stack of the Android project where I executed the sonar task: cpp, swift, go, python, cobol, vbnet to name just a few that are definitely quite surprising to be found there (and that are also among the heaviest ones).
When running ephemeral builds in the CI our agents need to download all of these files over and over again. This increases the chances for failures or download latencies that will impact the overall build.
I was wondering if this could be improved to limit the code to download only the specific language plugins that are necessary for the project instead of everything each time.
For reference, we are currently using version 4.2.1.3168
of the Gradle Plugin.
Attaching here a screenshot with the contents for context.
Thanks!