mirror of
https://github.com/expo/config-plugins.git
synced 2026-11-13 20:28:07 -10:00
chore(android-jsc-intl): lint fix
This commit is contained in:
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;
|
||||
Reference in new issue
Block a user