Browse Source

Remove -XX:MaxHeapSize=256m from default GRADLE_OPTS

This setting was causing failures in the CI build, and was not present
prior to the recent updates to gradle wrapper generation.

This commit also simplifies the gradle wrapper customizations by placing
the logic in a doLast block within the original 'wrapper' task, as
to creating a second wrapper task and extending from the first.
pull/177/head
Chris Beams 12 years ago
parent
commit
bbe1301d63
  1. 20
      build.gradle
  2. 2
      gradle/wrapper/gradle-wrapper.properties
  3. 2
      gradlew
  4. 2
      gradlew.bat

20
build.gradle

@ -802,15 +802,15 @@ configure(rootProject) { @@ -802,15 +802,15 @@ configure(rootProject) {
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.2'
}
}
def defaultWrapper = tasks["wrapper"]
task wrapper(overwrite: true, dependsOn: defaultWrapper) << {
def gradleOpts = "-XX:MaxPermSize=1024m -Xmx1024m -XX:MaxHeapSize=256m"
File wrapperFile = file('gradlew')
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=", "GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
File wrapperBatFile = file('gradlew.bat')
wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=", "set GRADLE_OPTS=$gradleOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
doLast() {
def gradleOpts = "-XX:MaxPermSize=1024m -Xmx1024m"
File wrapperFile = file('gradlew')
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
File wrapperBatFile = file('gradlew.bat')
wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
"set GRADLE_OPTS=$gradleOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
}
}
}

2
gradle/wrapper/gradle-wrapper.properties vendored

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#Wed Oct 31 17:27:34 PDT 2012
#Thu Nov 01 11:02:41 CET 2012
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

2
gradlew vendored

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
GRADLE_OPTS="-XX:MaxPermSize=1024m -Xmx1024m -XX:MaxHeapSize=256m $GRADLE_OPTS"
GRADLE_OPTS="-XX:MaxPermSize=1024m -Xmx1024m $GRADLE_OPTS"
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"

2
gradlew.bat vendored

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set GRADLE_OPTS=-XX:MaxPermSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%
set GRADLE_OPTS=-XX:MaxPermSize=1024m -Xmx1024m %GRADLE_OPTS%
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0

Loading…
Cancel
Save