Bug 1954747 - Standardize jvmargs across projects to share Gradle daemon r=nalexander,android-reviewers

This changes makes all projects use identical `org.gradle.jvmargs`, eliminating
the `Starting a Gradle Daemon, 2 incompatible Daemons could not be reused`warning.

By sharing a single daemon with consistent JVM settings, we greatly reduce the
build’s overall memory footprint.

Differential Revision: https://phabricator.services.mozilla.com/D247878
This commit is contained in:
Alex Hochheiden
2025-05-06 19:08:07 +00:00
committed by ahochheiden@mozilla.com
parent 1beb232be4
commit 3465852b66
4 changed files with 11 additions and 3 deletions

View File

@@ -3,11 +3,13 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.configureondemand=true
# Be careful when changing org.gradle.jvmargs below. It will clobber
# any defaults set by Gradle: https://github.com/gradle/gradle/issues/19750
org.gradle.jvmargs=-Xmx8g -Xms2g -XX:MaxMetaspaceSize=6g
# Temporary workaround: all projects must use identical JVM arguments in gradle.properties to enable daemon sharing.
# Do not modify these values without first reviewing Bug 1954747: https://bugzilla.mozilla.org/show_bug.cgi?id=1954747
org.gradle.jvmargs=-Xmx7g -Xms2g -XX:MaxMetaspaceSize=6g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC
org.gradle.daemon=true
org.gradle.configuration-cache=true

View File

@@ -13,6 +13,8 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Temporary workaround: all projects must use identical JVM arguments in gradle.properties to enable daemon sharing.
# Do not modify these values without first reviewing Bug 1954747: https://bugzilla.mozilla.org/show_bug.cgi?id=1954747
org.gradle.jvmargs=-Xmx7g -Xms2g -XX:MaxMetaspaceSize=6g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC
org.gradle.daemon=true

View File

@@ -10,6 +10,8 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Temporary workaround: all projects must use identical JVM arguments in gradle.properties to enable daemon sharing.
# Do not modify these values without first reviewing Bug 1954747: https://bugzilla.mozilla.org/show_bug.cgi?id=1954747
org.gradle.jvmargs=-Xmx7g -Xms2g -XX:MaxMetaspaceSize=6g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC
org.gradle.configureondemand=true

View File

@@ -13,9 +13,11 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.useAndroidX=true
# Temporary workaround: all projects must use identical JVM arguments in gradle.properties to enable daemon sharing.
# Do not modify these values without first reviewing Bug 1954747: https://bugzilla.mozilla.org/show_bug.cgi?id=1954747
org.gradle.jvmargs=-Xmx7g -Xms2g -XX:MaxMetaspaceSize=6g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC
org.gradle.configureondemand=true
android.useAndroidX=true
org.gradle.configuration-cache=true