gradle: Update default jvm options

This commit is contained in:
Owain van Brakel
2019-07-24 22:46:27 +02:00
parent 0935b5f836
commit da159fd765
3 changed files with 14 additions and 2 deletions

View File

@@ -32,3 +32,15 @@ subprojects {
ignoreFailures = false
}
}
wrapper {
gradleVersion = '5.5.1'
def jvmOpts = "-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
inputs.property("jvmOpts", jvmOpts)
doLast {
def optsEnvVar = "DEFAULT_JVM_OPTS"
scriptFile.write scriptFile.text.replace("$optsEnvVar='\"-Xmx64m\" \"-Xms64m\"'", "$optsEnvVar='\"$jvmOpts\"'")
batchScript.write batchScript.text.replace("set $optsEnvVar=\"-Xmx64m\" \"-Xms64m\"", "set $optsEnvVar=\"$jvmOpts\"")
}
}