Skip to content

Commit

Permalink
Increase max heap size for template gradle build
Browse files Browse the repository at this point in the history
Summary:
Updates maximum heap size for the gradle build to account for building RN from source when new architecture is enabled.

Changelog: [Changed][Android] - Use 2g as a default heap size for gradle builds

Reviewed By: cortinico

Differential Revision: D33947090

fbshipit-source-id: 2f551e688f2d92c3092e053086f6933779cd6f63
  • Loading branch information
Andrei Shikov authored and facebook-github-bot committed Feb 2, 2022
1 parent 48318b1 commit 09e418e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is causing issue with dependencies task: https://github.com/gradle/gradle/issues/9645#issuecomment-530746758
# org.gradle.configureondemand=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8
org.gradle.parallel=true

android.useAndroidX=true
Expand Down
4 changes: 2 additions & 2 deletions template/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down

0 comments on commit 09e418e

Please sign in to comment.