Skip to content

Commit

Permalink
desktop: Move JVM args definition to build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
alvasw committed Aug 5, 2023
1 parent 44ab029 commit 4464a2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 0 additions & 8 deletions build-logic/commons/src/main/groovy/bisq.application.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ installDist {
unixScriptFile.text = unixScriptFile.text.replace(
'APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit', 'APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit')

if (applicationName == 'desktop') {
def script = file("${rootProject.projectDir}/bisq-$applicationName")
script.text = script.text.replace(
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=8g -Xss1280k -XX:+UseG1GC ' +
'-XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5 -XX:+UseStringDeduplication ' +
'-Djava.net.preferIPv4Stack=true"')
}

if (applicationName == 'apitest') {
// Pass the logback config file as a system property to avoid chatty
// logback startup due to multiple logback.xml files in the classpath
Expand Down
7 changes: 7 additions & 0 deletions desktop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ plugins {
id "com.github.johnrengelman.shadow" version "5.2.0"
}

application {
mainClass = 'bisq.desktop.app.BisqAppMain'
applicationDefaultJvmArgs = ['-XX:MaxRAM=8g', '-Xss1280k', '-XX:+UseG1GC', '-XX:MaxHeapFreeRatio=10',
'-XX:MinHeapFreeRatio=5', '-XX:+UseStringDeduplication',
'-Djava.net.preferIPv4Stack=true']
}

apply from: 'package/package.gradle'

shadowDistTar.enabled = false
Expand Down

0 comments on commit 4464a2d

Please sign in to comment.