Skip to content

Commit

Permalink
Alternative way to set :run, IJ run config, and app scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Jan 10, 2022
1 parent 3b66dc1 commit f3a6426
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
28 changes: 15 additions & 13 deletions server/jetty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,7 @@ distributions {
}
}

def extraJvmArgs = []
if (hasProperty('groovy')) {
extraJvmArgs = ['-Ddeephaven.console.type=groovy']
}

applicationName = 'start'
mainClassName = 'io.deephaven.server.jetty.JettyMain'
applicationDefaultJvmArgs = [
def extraJvmArgs = [
'-server',
'-XX:+UseG1GC',
'-XX:MaxGCPauseMillis=100',
Expand All @@ -66,10 +59,19 @@ applicationDefaultJvmArgs = [
'-XX:MinRAMPercentage=70.0',
// the percentage of system memory that the JVM will use as maximum
'-XX:MaxRAMPercentage=80.0',
] + extraJvmArgs

apply plugin: 'io.deephaven.java-open-nio'

]
if (hasProperty('groovy')) {
extraJvmArgs += ['-Ddeephaven.console.type=groovy']
}
tasks.withType(JavaExec) {
jvmArgs applicationDefaultJvmArgs
// This appends to the existing jvm args, so that java-open-nio still takes effect
jvmArgs extraJvmArgs
}
tasks.withType(CreateStartScripts) {
defaultJvmOpts += extraJvmArgs
}

applicationName = 'start'
mainClassName = 'io.deephaven.server.jetty.JettyMain'

apply plugin: 'io.deephaven.java-open-nio'
28 changes: 15 additions & 13 deletions server/netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@ distributions {
}
}

def extraJvmArgs = []
if (hasProperty('groovy')) {
extraJvmArgs = ['-Ddeephaven.console.type=groovy']
}

applicationName = 'start'
mainClassName = 'io.deephaven.server.netty.NettyMain'
applicationDefaultJvmArgs = [
def extraJvmArgs = [
'-server',
'-XX:+UseG1GC',
'-XX:MaxGCPauseMillis=100',
Expand All @@ -58,14 +51,23 @@ applicationDefaultJvmArgs = [
'-XX:MinRAMPercentage=70.0',
// the percentage of system memory that the JVM will use as maximum
'-XX:MaxRAMPercentage=80.0',
] + extraJvmArgs
]
if (hasProperty('groovy')) {
extraJvmArgs += ['-Ddeephaven.console.type=groovy']
}
tasks.withType(JavaExec) {
// This appends to the existing jvm args, so that java-open-nio still takes effect
jvmArgs extraJvmArgs
}
tasks.withType(CreateStartScripts) {
defaultJvmOpts += extraJvmArgs
}

applicationName = 'start'
mainClassName = 'io.deephaven.server.netty.NettyMain'

artifacts {
applicationDist project.tasks.findByName('distTar')
}

apply plugin: 'io.deephaven.java-open-nio'

tasks.withType(JavaExec) {
jvmArgs applicationDefaultJvmArgs
}

0 comments on commit f3a6426

Please sign in to comment.