t3-code-android-nightly/apps/mobile/plugins/withAndroidGradleHeap.cjs
Julius Marminge c1ec1915fc
[codex] Add Android mobile support (#3579)
Co-authored-by: Horus Lugo <horusgoul@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Shivam Sharma <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: Ben Davis <45952064+bmdavis419@users.noreply.github.com>
Co-authored-by: Alex <me@pixp.cc>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius@mac.lan>
2026-07-12 12:03:35 +02:00

22 lines
695 B
JavaScript

const { withGradleProperties } = require("expo/config-plugins");
// The Expo template's 2GB heap is too small for D8 dex merging in this app,
// causing OutOfMemoryError in :app:mergeExtDexDebug.
const JVM_ARGS = "-Xmx4096m -XX:MaxMetaspaceSize=1024m";
module.exports = function withAndroidGradleHeap(config) {
return withGradleProperties(config, (nextConfig) => {
const properties = nextConfig.modResults.filter(
(item) => !(item.type === "property" && item.key === "org.gradle.jvmargs"),
);
properties.push({
type: "property",
key: "org.gradle.jvmargs",
value: JVM_ARGS,
});
nextConfig.modResults = properties;
return nextConfig;
});
};