gradle-doctor icon indicating copy to clipboard operation
gradle-doctor copied to clipboard

False positive with UseParallelGC on android studio project

Open hernando-montoya opened this issue 1 year ago • 2 comments

A problem occurred configuring root project 'android-vente-privee'.

=============================== Gradle Doctor Prescriptions ============================================ | For faster builds, use the parallel GC. | | Add -XX:+UseParallelGC to the org.gradle.jvmargs | ========================================================================================================

OS configuration

Apple M1 Pro mac 15.0.1

> Configure project : Android studio Koala / LadyBug Kotlin Version: 2.0.20 R8 Version: 8.6.27 Gradle Version: 8.9 JVM Version: 21.0.2 (BellSoft 21.0.2+14-LTS)

gradle.properties file content:

org.gradle.parallel=true org.gradle.configureondemand=true org.gradle.daemon=true org.gradle.configuration-cache=false

org.gradle.caching=true org.gradle.vfs.watch=true org.gradle.jvmargs=-Xmx16g --illegal-access=permit -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 kotlin.daemon.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 android.useAndroidX=true android.enableJetifier=false

android.jetifier.ignorelist=bcprov-jdk15on android.nonTransitiveRClass=false android.enableR8.fullMode=false

android.experimental.lint.heapSize=12g android.experimental.runLintInProcess=true

dependency.analysis.android.ignored.variants=release,veepeeAllRelease,vexAllRelease,privaliaEsRelease,privaliaItRelease dependency.analysis.print.build.health=true

hernando-montoya avatar Oct 08 '24 09:10 hernando-montoya

Looks like UseParallelGC should be disabled by default, or the recommendation to enable "UseParallelGC" should be justified by the measurements from the running build.

vlsi avatar Jan 09 '25 16:01 vlsi

Same here for a non-Android project, the use of -XX:+UseParallelGC is recommended although it's already in org.gradle.jvmargs.

sschuberth avatar Aug 01 '25 17:08 sschuberth