Skip to content

Instantly share code, notes, and snippets.

@pgreze
Last active May 27, 2021 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgreze/062fdc60425938b3ce18b902c1fccb78 to your computer and use it in GitHub Desktop.
Save pgreze/062fdc60425938b3ce18b902c1fccb78 to your computer and use it in GitHub Desktop.
About Gradle and memory declaration

From Gradle

About Configuring JVM memory:

The org.gradle.jvmargs Gradle property controls the VM running the build. It defaults to -Xmx512m "-XX:MaxMetaspaceSize=256m"

The JAVA_OPTS environment variable controls the command line client, which is only used to display console output. It defaults to -Xmx64m

But:

There is one case where the client VM can also serve as the build VM: If you deactivate the Gradle Daemon and the client VM has the same settings as required for the build VM, the client VM will run the build directly. Otherwise the client VM will fork a new VM to run the actual build in order to honor the different settings.

About GRADLE_OPTS:

Specifies JVM arguments to use when starting the Gradle client VM. The client VM only handles command line input/output, so it is rare that one would need to change its VM options. The actual build is run by the Gradle daemon, which is not affected by this environment variable.

CircleCI

Common Android memory issues https://support.circleci.com/hc/en-us/articles/360021812453-Common-Android-memory-issues

Circle CI & Android: 8 advanced configuration tips https://medium.com/dipien/circle-ci-android-configuration-tips-ca0e8148c819

Others

Latest in GU: circleci/circleci-docs#2945 (comment)

Issue with parallel: https://youtrack.jetbrains.com/issue/KT-15562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment