The best way to control Claude Code, Codex and more from any computer or phone
| 1 | const { withGradleProperties } = require("expo/config-plugins"); |
| 2 | |
| 3 | // Expo's 2GB heap exhausts memory during :app:mergeExtDexDebug. |
| 4 | const JVM_ARGS = "-Xmx4096m -XX:MaxMetaspaceSize=1024m"; |
| 5 | |
| 6 | module.exports = function withAndroidGradleHeap(config) { |
| 7 | return withGradleProperties(config, (nextConfig) => { |
| 8 | const properties = nextConfig.modResults.filter( |
| 9 | (item) => !(item.type === "property" && item.key === "org.gradle.jvmargs"), |
| 10 | ); |
| 11 | |
| 12 | properties.push({ |
| 13 | type: "property", |
| 14 | key: "org.gradle.jvmargs", |
| 15 | value: JVM_ARGS, |
| 16 | }); |
| 17 | |
| 18 | nextConfig.modResults = properties; |
| 19 | return nextConfig; |
| 20 | }); |
| 21 | }; |