Using the application plugin, applicationDefaultJvmArgs are inherited by the distribution, however applying this plugin causes those to be overwritten/ignored.
Without the plugin applied, I can set:
application {
// ...
applicationDefaultJvmArgs = listOf("-Dabc=123")
}
...and I see DEFAULT_JVM_OPTS='"-Dabc=123"' in the dist script. If I apply the plugin, that is removed/replaced with EG DEFAULT_JVM_OPTS="-javaagent:$APP_HOME/agent-libs/opentelemetry-javaagent-2.1.0.jar" despite the arg still being in my application block. It would be nice for these to play nice as that's an easy way to globally set default opts for all tasks/everywhere the application is used.
Using the application plugin,
applicationDefaultJvmArgsare inherited by the distribution, however applying this plugin causes those to be overwritten/ignored.Without the plugin applied, I can set:
application { // ... applicationDefaultJvmArgs = listOf("-Dabc=123") }...and I see
DEFAULT_JVM_OPTS='"-Dabc=123"'in the dist script. If I apply the plugin, that is removed/replaced with EGDEFAULT_JVM_OPTS="-javaagent:$APP_HOME/agent-libs/opentelemetry-javaagent-2.1.0.jar"despite the arg still being in myapplicationblock. It would be nice for these to play nice as that's an easy way to globally set default opts for all tasks/everywhere the application is used.