From 998208305ee25786f3211b997d6062bbb86879af Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Wed, 31 Aug 2022 22:10:39 +0000 Subject: [PATCH] Bug 1786164 - Add more Gradle JVM memory flags. r=geckoview-reviewers,jonalmeida See https://github.com/mozilla-mobile/fenix/pull/26542 for more discussion. Also specify a lower maximum heap size more in line with other projects and remove some redundant settings in other gradle.properties files. Differential Revision: https://phabricator.services.mozilla.com/D155179 --- gradle.properties | 4 +++- mobile/android/gradle/dotgradle-offline/gradle.properties | 1 - mobile/android/gradle/dotgradle-online/gradle.properties | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index f896b75d95c22..e096cd6260bac 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,6 @@ org.gradle.parallel=true org.gradle.daemon=true -org.gradle.jvmargs=-Xmx32768M +# 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 android.useAndroidX=true diff --git a/mobile/android/gradle/dotgradle-offline/gradle.properties b/mobile/android/gradle/dotgradle-offline/gradle.properties index 000366cd2796f..3f77ec9a2ff3c 100644 --- a/mobile/android/gradle/dotgradle-offline/gradle.properties +++ b/mobile/android/gradle/dotgradle-offline/gradle.properties @@ -1,4 +1,3 @@ // Per https://docs.gradle.org/current/userguide/build_environment.html, this // overrides the gradle.properties in topsrcdir. org.gradle.daemon=false -org.gradle.jvmargs=-Xmx32768M diff --git a/mobile/android/gradle/dotgradle-online/gradle.properties b/mobile/android/gradle/dotgradle-online/gradle.properties index 000366cd2796f..3f77ec9a2ff3c 100644 --- a/mobile/android/gradle/dotgradle-online/gradle.properties +++ b/mobile/android/gradle/dotgradle-online/gradle.properties @@ -1,4 +1,3 @@ // Per https://docs.gradle.org/current/userguide/build_environment.html, this // overrides the gradle.properties in topsrcdir. org.gradle.daemon=false -org.gradle.jvmargs=-Xmx32768M