fix: run expo prepare

This commit is contained in:
Fernando Rojo authored and GitHub committed 2021-07-07 23:39:23 +00:00
1 parent b5246338cb
commit 8d364ed99e
2 files changed
+20 -17

No files matched your search

+7 -2
View File
@@ -1,3 +1,8 @@
import { ConfigPlugin } from "@expo/config-plugins";
declare const _default: ConfigPlugin<void | {}>;
export default _default;
/**
* Apply android-jsc-intl configuration for Expo SDK 42 projects.
*
* This plugin lets you access the `Intl` API in Android apps (without Hermes).
*/
declare const withAndroidJscIntl: ConfigPlugin;
export default withAndroidJscIntl;
@@ -3,21 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
const config_plugins_1 = require("@expo/config-plugins");
/**
* Apply android-jsc-intl configuration for Expo SDK 42 projects.
*
* This plugin lets you access the `Intl` API in Android apps (without Hermes).
*/
const withAndroidJscIntl = (config, _props = {}) => {
// Support passing no props to the plugin.
const props = _props || {};
const withAndroidJscIntl = (config) => {
// Return the modified config.
return config;
return config_plugins_1.withAppBuildGradle(config, config => {
if (config.modResults.language === 'groovy') {
config.modResults.contents = config.modResults.contents.replace('org.webkit:android-jsc:+', 'org.webkit:android-jsc-intl:+');
}
else {
throw new Error('[@expo/config-plugins][withAndroidJscIntl] Cannot enable Intl in Android JSC app gradle because the build.gradle is not groovy.');
}
return config;
});
};
const pkg = {
// Prevent this plugin from being run more than once.
// This pattern enables users to safely migrate off of this
// out-of-tree `@config-plugins/android-jsc-intl` to a future
// upstream plugin in `android-jsc-intl`
name: "android-jsc-intl",
// Indicates that this plugin is dangerously linked to a module,
// and might not work with the latest version of that module.
version: "UNVERSIONED",
};
exports.default = config_plugins_1.createRunOncePlugin(withAndroidJscIntl, pkg.name, pkg.version);
exports.default = withAndroidJscIntl;