From a8ccbdfd60b950ed758e2cc8d44f1846c3ad23bd Mon Sep 17 00:00:00 2001 From: jaymode Date: Fri, 24 Aug 2018 13:31:44 -0600 Subject: [PATCH 1/2] Build: forked compiler max memory matches jvmArgs This commit removes the setting of the fork options maximum memory size in our build plugin and instead adds the value in the gradle.properties file to be alongside the value set in jvmArgs. This change is necessary when using parallel compilation as 512m is not sufficient for parallel compilation on some machines. --- .../src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 1 - gradle.properties | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index fb979a77dacea..bce00ae8f6d3a 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -601,7 +601,6 @@ class BuildPlugin implements Plugin { } else { options.fork = true options.forkOptions.javaHome = compilerJavaHomeFile - options.forkOptions.memoryMaximumSize = "512m" } if (targetCompatibilityVersion == JavaVersion.VERSION_1_8) { // compile with compact 3 profile by default diff --git a/gradle.properties b/gradle.properties index 08b03629ad53a..a23c61e877486 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ org.gradle.daemon=false org.gradle.jvmargs=-Xmx2g +options.forkOptions.memoryMaximumSize=2G From 5d0e32fb80c45cc2ed5504eec335dfd85de237d9 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sun, 26 Aug 2018 14:42:07 -0400 Subject: [PATCH 2/2] Consistent casing --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a23c61e877486..6b04e99c20441 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=false org.gradle.jvmargs=-Xmx2g -options.forkOptions.memoryMaximumSize=2G +options.forkOptions.memoryMaximumSize=2g