The ‘application’ plugin lets you define ‘defaultJvmArgs’ that are applied to all platforms. Unfortunately defining OSX specific settings (such as -Xdock:name and -Xdock:icon) causes trouble on Linux, even though IMHO these unrecognized options should be completely ignored by the JVM.
Here’s a sample error when these options are enabled on Linux
Unrecognized option: -Xdock:name=GuideCamTool
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Is there a way to define platform specific JVM args?
Hey Andres, thanks for reporting this. I’ll have a look on this soon.
Those default icons only make sense when generating Gradle specific scripts, but not those created by the ‘application’ plugin. I’d love to see a platform specific jvmArgs property, something along the lines of
platformJvmArgs = [
We have 2 upcoming Hackergarten sessions (Basel & Luzern) in January; perhaps we can tackle this issue. I think a signed CLA is required for making contributions to the gradle core, isn’t it?
That’s correct, it can be signed electronically at http://www.gradleware.com/contributor-agreement.
Done. Also opened a discussion topic at gradle-dev to flesh out ideas and hopefully make a contribution soon