I have Gradle project that I export to Bloop, which uses the Gradle application plugin. One of the config options for that plugin is applicationDefaultJvmArgs. This lets you specify Jvm arguments to use when running the app.
These jvm args don't get exported to the .bloop config json files (the MainClass config does however)
Example:
application {
mainClass = 'com.myorg.MyAppMain'
applicationDefaultJvmArgs = ['-Dgreeting.language=en, -Xmx16g']
}
Results in the following .bloop/my_app.json config
"platform": {
"name": "jvm",
"config": {
"home": "/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home",
"options": [
"-Xmx1024mb"
]
},
"mainClass": [
"com.myorg.MyAppMain"
],
Thanks for reporting! I think this might be fixable around here: https://github.com/scalacenter/bloop/blob/master/integrations/gradle-bloop/src/main/scala/bloop/integrations/gradle/model/BloopConverter.scala#L410
If the test task is empty we should try to get applicationDefaultJvmArgs - should not be too hard I think. Though I am not sure why we are only getting information from the test task there :thinking:
Though I am not sure why we are only getting information from the test task there 馃
Probably because I didn't know applicationDefaultJvmArgs existed :smiley:
I'm just waiting on this to hopefully get some info on the recommended way to properly extract the mainClass and then I'll add applicationDefaultJvmArgs in too
Thanks for looking at this @Arthurm1! Looking forward to supporting default jvm args, I've seen them be used often in OSS builds.
Most helpful comment
Probably because I didn't know
applicationDefaultJvmArgsexisted :smiley:I'm just waiting on this to hopefully get some info on the recommended way to properly extract the
mainClassand then I'll addapplicationDefaultJvmArgsin too