Skip to content

Commit

Permalink
Set initial heap size to 128 MB
Browse files Browse the repository at this point in the history
  • Loading branch information
bwRavencl committed Mar 23, 2024
1 parent 269f12e commit 3992770
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ ext {
tmpDir = layout.buildDirectory.dir 'tmp'
runtimeDir = tmpDir.map { it.dir 'runtime' }

xmsJvmArg = '-Xms128m'

linuxAddOpensValue = "java.desktop/sun.awt.X11=${project.application.mainModule.get()}"
linuxJvmArgs = [
"--add-opens=$linuxAddOpensValue"
Expand Down Expand Up @@ -323,6 +325,8 @@ tasks.withType(JavaCompile).configureEach {
}

run {
jvmArgs += xmsJvmArg

if (os.linux)
jvmArgs += linuxJvmArgs
}
Expand Down Expand Up @@ -381,7 +385,9 @@ tasks.register('jpackage', Exec) {
"Copyright ${new Date().format 'yyyy'} Matteo Hausner",
'--vendor',
'Matteo Hausner',
'--verbose'
'--verbose',
'--java-options',
xmsJvmArg
]
if (os.linux)
linuxJvmArgs.each { commandLineParts.addAll(['--java-options', it]) }
Expand Down

0 comments on commit 3992770

Please sign in to comment.