crotwell / gradle-macappbundle

A Gradle Plugin to create a Mac OSX .app application and dmg based on the project.
Apache License 2.0
94 stars 33 forks source link

Adding javaExtras.put() creates an app that won’t run #57

Closed hepcat72 closed 6 years ago

hepcat72 commented 6 years ago

Hi,

I wanted to add -Xmx4g to the Info.plist in the JVMOptions section, but it gets put in in the wrong format, causing the app to crash. Maybe I’m doing something wrong, but the javaExtras.put takes key value pairs so it doesn’t work if it put the single -Xmx4g flag and if I try something like “-Xmx”, “4g”, it crashes because it doesn’t like the resulting “-Xmx=4g” that it puts in the file. If I manually edit the Info.plist value to remove the “=“, it works. How do I add just that one flag to the file?

Thanks, Rob

hepcat72 commented 6 years ago

I just discovered that if you put:

macAppBundle {
  ...
  javaExtras.put("-Xmx4g",null)
}

it works. It think it would be helpful (for gradle beginners) to have this in the wiki.

crotwell commented 6 years ago

Added to wiki here

hepcat72 commented 6 years ago

Cool! Thanks.