限制 ./gradlew run 运行时的默认内存占用 (#4722)
This commit is contained in:
@@ -335,7 +335,7 @@ tasks.register<JavaExec>("run") {
|
|||||||
classpath = files(jarPath)
|
classpath = files(jarPath)
|
||||||
workingDir = rootProject.rootDir
|
workingDir = rootProject.rootDir
|
||||||
|
|
||||||
val vmOptions = parseToolOptions(System.getenv("HMCL_JAVA_OPTS"))
|
val vmOptions = parseToolOptions(System.getenv("HMCL_JAVA_OPTS") ?: "-Xmx1g")
|
||||||
if (vmOptions.none { it.startsWith("-Dhmcl.offline.auth.restricted=") })
|
if (vmOptions.none { it.startsWith("-Dhmcl.offline.auth.restricted=") })
|
||||||
vmOptions += "-Dhmcl.offline.auth.restricted=false"
|
vmOptions += "-Dhmcl.offline.auth.restricted=false"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user