Skip to content

Commit

Permalink
android: Use Intl variant of JavaScriptCore.
Browse files Browse the repository at this point in the history
We don't want to be using JavaScriptCore forever, if we can avoid
it; we're tracking the switch to Hermes as zulip#4131. In fact, Hermes
doesn't yet support Intl.

For now, this tiny code change will allow `react-intl` to work on
Android. A `react-intl` doc [1] links to instructions [2] [3] to use
a variant of JavaScriptCore that supports `Intl`. So, follow those
instructions.

Reportedly, this change will add 6MiB per architecture. zulip#3547 was
recently resolved, though, giving us some wiggle room.

[1] https://formatjs.io/docs/react-intl/#react-native
[2] https://github.com/react-native-community/jsc-android-buildscripts#international-variant
[3] They're slightly out-of-date, currently, but it's still easy to
    tell what to do; see
    facebook/react-native@d7f5153cd#diff-b8dd15c78827c1b48f9fe21c45686142R100-R111
    for the new edit to make to `android/app/build.gradle`.
  • Loading branch information
chrisbobbe committed Oct 22, 2020
1 parent 2e049c4 commit 6c631f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def shrinkResourcesInProguardBuilds = false
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
def jscFlavor = 'org.webkit:android-jsc-intl:+'

/**
* Whether to enable the Hermes VM.
Expand Down

0 comments on commit 6c631f2

Please sign in to comment.