Some checks failed
CI / Lint & Typecheck (push) Has been cancelled
CI / Test (routes) (push) Has been cancelled
CI / Test (security) (push) Has been cancelled
CI / Test (services) (push) Has been cancelled
CI / Test (unit) (push) Has been cancelled
CI / Test (integration) (push) Has been cancelled
CI / Test Coverage (push) Has been cancelled
CI / Build (push) Has been cancelled
27 lines
753 B
JavaScript
27 lines
753 B
JavaScript
const { withGradleProperties } = require('expo/config-plugins');
|
|
|
|
/**
|
|
* Config plugin to customize Android gradle.properties
|
|
* Used to set JVM memory args for builds with many native dependencies
|
|
*/
|
|
module.exports = function withCustomGradleProperties(config, props) {
|
|
return withGradleProperties(config, (config) => {
|
|
for (const [key, value] of Object.entries(props)) {
|
|
const existingIndex = config.modResults.findIndex(
|
|
(p) => p.type === 'property' && p.key === key
|
|
);
|
|
|
|
if (existingIndex !== -1) {
|
|
config.modResults[existingIndex].value = value;
|
|
} else {
|
|
config.modResults.push({
|
|
type: 'property',
|
|
key,
|
|
value,
|
|
});
|
|
}
|
|
}
|
|
return config;
|
|
});
|
|
};
|