Is there a way to pass jvm args to `gradle.propert...
# community-support
v
Is there a way to pass jvm args to
gradle.properties
such that if the current jvm version doesn't recognise them, they'll be ignored?
Copy code
org.gradle.jvmargs=-Xmx5g -XX:+UseCompactObjectHeaders
UseCompactObjectHeaders
is only available on jvm25 and I don't want to force it on everyone in the team yet
s
there’s
-XX:+IgnoreUnrecognizedVMOptions
option
v
If you would use daemon jvm criteria (given you are on new enough Gradle) all would automatically use the same Java version for running the daemon if your "don't want to force" is, because you don't want to force them to do something manually and ensure they use the right version.
v
Hm, it downloads missing jvm transparently?
v
Yes
It is like JVM toolchains feature, just for the daemon JVM
b
Otherwise you can always use this JVM flag:
Copy code
-XX:+IgnoreUnrecognizedVMOptions
v
Yes, that was the first reply here 😄
b
haha 🤦, how could I completely missed it 🤯