diff --git a/adopt-github-release/gradlew b/adopt-github-release/gradlew index a0e1845..9a1f6a9 100755 --- a/adopt-github-release/gradlew +++ b/adopt-github-release/gradlew @@ -44,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx1g" "-Xms1g"' +DEFAULT_JVM_OPTS='"-Xmx512m" "-Xms512m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -177,6 +177,9 @@ save () { } APP_ARGS=$(save "$@") +# Disable gradle daemon, so that no background long running task is left running, and we can control JVM size from the client java invocation +GRADLE_OPTS="-Dorg.gradle.daemon=false ${GRADLE_OPTS}" + # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"