chore(android-jsc-intl): lint fix

This commit is contained in:
evanbacon authored and Evan Bacon committed 2022-03-22 17:08:15 -05:00
1 parent 4103b4eb7d
commit 5ca4e44a49
1 file changed
+11 -9
@@ -2,22 +2,24 @@ import { ConfigPlugin, withAppBuildGradle } from "@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: ConfigPlugin = (config) => {
// Return the modified config.
return withAppBuildGradle(config, config => {
if (config.modResults.language === 'groovy') {
return withAppBuildGradle(config, (config) => {
if (config.modResults.language === "groovy") {
config.modResults.contents = config.modResults.contents.replace(
'org.webkit:android-jsc:+',
'org.webkit:android-jsc-intl:+'
)
"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.')
throw new Error(
"[@expo/config-plugins][withAndroidJscIntl] Cannot enable Intl in Android JSC app gradle because the build.gradle is not groovy."
);
}
return config
return config;
});
};
export default withAndroidJscIntl
export default withAndroidJscIntl;