Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move JVM args to build.gradle files #6796

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apitest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions build-logic/commons/src/main/groovy/bisq.application.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"')
}
}
}

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