Skip to content

Commit

Permalink
Build: Remove max perm size option gradle jvmargs from gradle properties
Browse files Browse the repository at this point in the history
This 'MaxPermSize' JVM argument was added back in 2016 (July) and as
part of this starting 780ed5d commit.
By now, and with newer versions of Java (see Java 17), this argument has
been effectively removed. As such, when engineers are trying to build
this project with JDK17, they can't, see below exception:

------------------------------------------------------------------------

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at
https://docs.gradle.org/7.4.2/userguide/gradle_daemon.html
Process command line: /opt/homebrew/Cellar/openjdk@17/17.0.5/...
Please read the following process output to find out more:
-----------------------
Unrecognized VM option 'MaxPermSize=512m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

------------------------------------------------------------------------

FYI: This JVM argument went obsolete as part of Java 16 and then
completely removed as part of Java 17, see below:

- Java 16: https://docs.oracle.com/en/java/javase/16/docs/specs/man/
java.html#obsolete-java-options
- Java 17: https://docs.oracle.com/en/java/javase/17/docs/specs/man/
java.html#removed-java-options
  • Loading branch information
ParaskP7 committed Nov 17, 2022
1 parent 3762b38 commit ba86630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx1536m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
android.enableJetifier=false
android.useAndroidX=true

Expand Down

0 comments on commit ba86630

Please sign in to comment.