Swap android-jsc for android-jsc-intl

Hi,

I need to use Intl (Intl.NumberFormat etc) in my ejected Expo project.

I’ve ejected to ExpoKit (SDK35) and I can see that node_modules/expokit/maven/org/webkit/android-jsc-intl exists. I’m trying to force a resolutionStrategy to use the intl version. I just don’t have the Gradle knowledge to implement this.

  1. SDK Version: 35
  2. Platforms(Android/iOS/web/all): Android

Figured it out.

Edit the resolutionStragergy:

configurations.all {
    resolutionStrategy {
           eachDependency { DependencyResolveDetails details ->
                 if (details.requested.name == 'android-jsc') {
                       details.useTarget group: details.requested.group, name: 'android-jsc-intl', version: 'r245459'
                    }
              }
        }
  }

See the diff here:

1 Like

Thanks for sharing the solution with the community, @ptgodev!

You’re welcome.

Ideally you’d have an option when ejecting to switch out the JSC: expo eject --intl

Especially since SDK36 is going with RN 0.61 which gives you the option to choose the “flavor” of the jsc.

It’d be great to see the Expo client app with Intl support, giving devs the option to choose an Intl option when initialising a new project (expo init --intl my-intl-project), then when building the APK (expo build:android), the returned APK has the intl jsc flavor.

I guess there’s a whole swath of things to consider. Not everyone is en-US :slight_smile:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.