Files
streamyfin/plugins/withGradleProperties.js
Lance Chant 3b926e0061 fix: fixing some performance issues and mpv upgrade
Updated libmpv to use 1.0.0
Fixed some performance issues with the upgrade
Fixed a few settings that weren't getting applied
Forced a higher ndk version as requirment from libmpv

Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
2026-06-24 14:42:48 +02:00

41 lines
1.0 KiB
JavaScript

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");
// NDK version required by libmpv 1.0.0
config = setGradlePropertiesValue(config, "ndkVersion", "29.0.14206865");
// Increase memory
config = setGradlePropertiesValue(
config,
"org.gradle.jvmargs",
"-Xmx4096m -XX:MaxMetaspaceSize=1024m",
);
return config;
};