diff --git a/apitest/build.gradle b/apitest/build.gradle index 6f9c36ea207..0b8a5da6b5d 100644 --- a/apitest/build.gradle +++ b/apitest/build.gradle @@ -2,7 +2,10 @@ plugins { id 'bisq.application' } -mainClassName = 'bisq.apitest.ApiTestMain' +application { + mainClass = 'bisq.apitest.ApiTestMain' + applicationDefaultJvmArgs = ['-Dlogback.configurationFile=apitest/build/resources/main/logback.xml'] +} // The external dao-setup.gradle file contains tasks to install and clean dao-setup // files downloaded from diff --git a/build-logic/commons/src/main/groovy/bisq.application.gradle b/build-logic/commons/src/main/groovy/bisq.application.gradle index 232aae91e62..9658c3f2ae7 100644 --- a/build-logic/commons/src/main/groovy/bisq.application.gradle +++ b/build-logic/commons/src/main/groovy/bisq.application.gradle @@ -38,24 +38,6 @@ installDist { def unixScriptFile = file("${rootProject.projectDir}/bisq-$applicationName") 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 - // (:daemon & :cli). - def script = file("${rootProject.projectDir}/bisq-$applicationName") - script.text = script.text.replace( - 'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="' + - '-Dlogback.configurationFile=apitest/build/resources/main/logback.xml"') - } } } diff --git a/desktop/build.gradle b/desktop/build.gradle index bb0fff3cf25..48d241d94e6 100644 --- a/desktop/build.gradle +++ b/desktop/build.gradle @@ -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