diff --git a/apps/mobile/app.json b/apps/mobile/app.json index b57127e6..1a2f3ff0 100644 --- a/apps/mobile/app.json +++ b/apps/mobile/app.json @@ -73,6 +73,7 @@ } }, "plugins": [ + "./plugins/with-gradle-jvm-memory.cjs", "expo-router", [ "@sentry/react-native/expo", diff --git a/apps/mobile/plugins/with-gradle-jvm-memory.cjs b/apps/mobile/plugins/with-gradle-jvm-memory.cjs new file mode 100644 index 00000000..2c24586b --- /dev/null +++ b/apps/mobile/plugins/with-gradle-jvm-memory.cjs @@ -0,0 +1,13 @@ +const { AndroidConfig, withGradleProperties } = require('expo/config-plugins'); + +const GRADLE_JVM_ARGS = '-Xmx2048m -XX:MaxMetaspaceSize=1024m'; + +module.exports = (config) => + withGradleProperties(config, (config) => { + config.modResults = AndroidConfig.BuildProperties.updateAndroidBuildProperty( + config.modResults, + 'org.gradle.jvmargs', + GRADLE_JVM_ARGS, + ); + return config; + });