Hello there,
I’m facing an issue related to Java heap size on my project.
When I try to run the code analysis with Sonarqube gradle 3.3 plugin, it just takes a lot of time (~1h30m to do the process, and finishes with an error:
The task that I’m running is ./gradlew sonarqube
One important thing is that using this to ignore first module, the analysis runs normally!:
project(":foo") {
sonarqube {
skipProject = true
}
}
The project’s structure is an monolythic/monorepo that is something like:
[common_features]
[another_things]
[foo] (FIRST APP)
[app]
[stuff]
[more_stuffs].....
[foo_variation] (SECOND APP)
[app]
[other_stuff]
[another_things].....
the [xx] represents modules in my repo.
Here are my sonarqube settings:
sonarqube {
properties {
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.projectKey", "foo_project-key"
property "sonar.projectName", "foos_projects"
property "sonar.organization", "my_foos_organization"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.inclusions", "**/*.java, **/*.kt"
property "sonar.exclusions", '**/*Test*/**,' + '*.json,' + '**/*test*/**,' + '**/.gradle/**,' + '**/R.class'
property "sonar.login", "fake_login_token"
property "sonar.sources", "**/src/main/java"
property "sonar.java.binaries", "build/tmp/kotlin-classes/debug"
}
}
Gradle configuration:
org.gradle.jvmargs=-Xmx8g -XX:MaxPermSize=8g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC
ps: tried to put more workers with property “sonar.ce.workerCount”, “4” but didn’t help.
ps2: tried to put property “build/intermediates/javac/debug/classes” to java classes, but didn’t help.
ps3: I’m using Jdk 11 to run the analysis.
ps4: already tried to run this step on bitrise, but nothing seems to be different.
What should I do to solve this problem?