mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
chore: expo 52 (#502)
Co-authored-by: herrrta <73949927+herrrta@users.noreply.github.com>
This commit is contained in:
40
plugins/withGradleProperties.js
Normal file
40
plugins/withGradleProperties.js
Normal file
@@ -0,0 +1,40 @@
|
||||
const { withGradleProperties } = require('expo/config-plugins');
|
||||
|
||||
function setGradlePropertiesValue(config, key, value) {
|
||||
return withGradleProperties(config, exportedConfig => {
|
||||
const props = exportedConfig.modResults;
|
||||
const keyIdx = props.findIndex(item => item.type === 'property' && item.key === key);
|
||||
const property = {
|
||||
type: 'property',
|
||||
key,
|
||||
value
|
||||
};
|
||||
|
||||
if (keyIdx >= 0) {
|
||||
props.splice(keyIdx, 1, property);
|
||||
}
|
||||
else {
|
||||
props.push(property);
|
||||
}
|
||||
|
||||
return exportedConfig;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = function withCustomPlugin(config) {
|
||||
// Expo 52 is not setting this
|
||||
// https://github.com/expo/expo/issues/32558
|
||||
config = setGradlePropertiesValue(
|
||||
config,
|
||||
'android.enableJetifier',
|
||||
'true',
|
||||
);
|
||||
|
||||
// Increase memory
|
||||
config = setGradlePropertiesValue(
|
||||
config,
|
||||
'org.gradle.jvmargs',
|
||||
'-Xmx4096m -XX:MaxMetaspaceSize=1024m',
|
||||
);
|
||||
return config;
|
||||
};
|
||||
Reference in New Issue
Block a user