Increase max heap size for compiling all tests with applymapping

Bug: 139725780
Change-Id: I949b21005591fb0b31d675415b437388de9dabcd
diff --git a/build.gradle b/build.gradle
index 11e3322..c532a85 100644
--- a/build.gradle
+++ b/build.gradle
@@ -834,8 +834,9 @@
 
 def baseR8CommandLine(args = []) {
     // Execute r8 commands against a stable r8 with relocated dependencies.
+    // TODO(b/139725780): See if we can remove or lower the heap size (-Xmx6g).
     return [org.gradle.internal.jvm.Jvm.current().getJavaExecutable(),
-            "-ea", "-jar", r8WithRelocatedDeps.outputs.files[0]] + args
+            "-Xmx6g", "-ea", "-jar", r8WithRelocatedDeps.outputs.files[0]] + args
 }
 
 def r8CfCommandLine(input, output, pgConfs = [], args = ["--release"], libs = []) {