+1
app.config.js
+1
app.config.js
···
240
240
},
241
241
],
242
242
'./plugins/starterPackAppClipExtension/withStarterPackAppClip.js',
243
+
'./plugins/withGradleJVMHeapSizeIncrease.js',
243
244
'./plugins/withAndroidManifestPlugin.js',
244
245
'./plugins/withAndroidManifestFCMIconPlugin.js',
245
246
'./plugins/withAndroidStylesAccentColorPlugin.js',
+34
plugins/withGradleJVMHeapSizeIncrease.js
+34
plugins/withGradleJVMHeapSizeIncrease.js
···
1
+
const {withGradleProperties} = require('expo/config-plugins')
2
+
3
+
function setGradlePropertiesValue(config, key, value) {
4
+
return withGradleProperties(config, exportedConfig => {
5
+
const keyIdx = exportedConfig.modResults.findIndex(
6
+
item => item.type === 'property' && item.key === key,
7
+
)
8
+
if (keyIdx >= 0) {
9
+
exportedConfig.modResults.splice(keyIdx, 1, {
10
+
type: 'property',
11
+
key,
12
+
value,
13
+
})
14
+
} else {
15
+
exportedConfig.modResults.push({
16
+
type: 'property',
17
+
key,
18
+
value,
19
+
})
20
+
}
21
+
22
+
return exportedConfig
23
+
})
24
+
}
25
+
26
+
module.exports = function withGradleJVMHeapSizeIncrease(config) {
27
+
config = setGradlePropertiesValue(
28
+
config,
29
+
'org.gradle.jvmargs',
30
+
'-Xmx4096m -XX:MaxMetaspaceSize=1024m', //Set data of your choice
31
+
)
32
+
33
+
return config
34
+
}