Skip to content

Commit

Permalink
Regenerate wrapper script
Browse files Browse the repository at this point in the history
  • Loading branch information
oehme committed Oct 21, 2018
1 parent b315734 commit 15a4419
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Expand Up @@ -32,13 +32,12 @@ class WrapperPlugin : Plugin<Project> {
wrapperUpdateTask("current", "current")

tasks.withType<Wrapper>().configureEach {
val jvmOpts = "-Xmx128m -Dfile.encoding=UTF-8"
val jvmOpts = "-Dfile.encoding=UTF-8"
inputs.property("jvmOpts", jvmOpts)
// TODO Do we want to use doLast or a finalizedBy task?
doLast {
val optsEnvVar = "DEFAULT_JVM_OPTS"
scriptFile.writeText(scriptFile.readText().replace("$optsEnvVar=\"\"", "$optsEnvVar=\"$jvmOpts\""))
batchScript.writeText(batchScript.readText().replace("set $optsEnvVar=", "set $optsEnvVar=$jvmOpts"))
scriptFile.writeText(scriptFile.readText().replace("$optsEnvVar='", "$optsEnvVar='$jvmOpts "))
batchScript.writeText(batchScript.readText().replace("set $optsEnvVar=", "set $optsEnvVar=$jvmOpts "))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Expand Up @@ -28,7 +28,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="-Xmx128m -Dfile.encoding=UTF-8"
DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=-Xmx128m -Dfile.encoding=UTF-8
set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down

0 comments on commit 15a4419

Please sign in to comment.