Increase stack space for javac processes.
R=sgjesse@google.com
Change-Id: Icb50661603834dd4f81afae0bf2734afc59a86d4
diff --git a/build.gradle b/build.gradle
index eed9769..06a0632 100644
--- a/build.gradle
+++ b/build.gradle
@@ -416,6 +416,13 @@
targetCompatibility = JavaVersion.VERSION_1_8
}
+// Javac often runs out of stack space when compiling the tests.
+// Increase the stack size for the javac process.
+tasks.withType(JavaCompile) {
+ options.fork = true
+ options.forkOptions.jvmArgs = ["-Xss4m"]
+}
+
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked'
}