Permalink
Browse files

Upgrade to gradle 1.2

Update the wrapper task to gradle 1.2 and automatically add the
appropriate memory options to generated files.
  • Loading branch information...
1 parent 3917dc7 commit 6ff3c57b1b9c5daf21cf9e1f3017245dd4755465 @philwebb philwebb committed Nov 12, 2012
Showing with 19 additions and 8 deletions.
  1. +13 −4 build.gradle
  2. BIN gradle/wrapper/gradle-wrapper.jar
  3. +2 −2 gradle/wrapper/gradle-wrapper.properties
  4. +3 −2 gradlew
  5. +1 −0 gradlew.bat
View
17 build.gradle
@@ -371,8 +371,17 @@ configure(rootProject) {
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
- gradleVersion = '1.0'
+ gradleVersion = '1.2'
+
+ doLast() {
+ def gradleOpts = "-XX:MaxPermSize=1024m -Xmx1024m"
+ def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256"
+ 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=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
+ }
}
-
-}
-
+}
View
BIN gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
View
4 gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Tue Jun 12 13:56:13 PDT 2012
+#Mon Nov 12 13:36:39 PST 2012
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.2-bin.zip
View
5 gradlew
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
##############################################################################
##
@@ -7,6 +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 $GRADLE_OPTS"
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
@@ -101,7 +102,7 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
- warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
View
1 gradlew.bat
@@ -9,6 +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=256 %GRADLE_OPTS%
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0

0 comments on commit 6ff3c57

Please sign in to comment.