[android][tools] fix expo go versioning issues on android (#22950)# Why fix expo-go android versioning for sdk 49 close ENG-8955 # How - [tools] fix for react-native monorepo changes - [
[android][tools] fix expo go versioning issues on android (#22950)# Why fix expo-go android versioning for sdk 49 close ENG-8955 # How - [tools] fix for react-native monorepo changes - [tools] update manifest-merger because the original one doesn't support java 17. since the new manifest-merger has kotlin runtime and the jar takes about 35MB. rather than committing a prebuilt jar, now we build manifest-merger from source. - [tools] since #22609 we don't have `package` in libraries' AndroidManifest.xml, the manifest-merger still requires the `package`, so we have to temporarily put the `package` back during manifest merging. (the `package` name is generated from `namespace` in build.gradle) - [tools] the original jarjar uses outdated [ASM](https://asm.ow2.io/) and it doesn't support bytecode generated by kotlin. react-native now has some kotlin code, and the original jarjar cannot transform package name from those kotlin classes. i've tried to rebuild a jarjar from [this revision](https://github.com/google/jarjar/commit/e11d5636aa45664271c8f1603067527b2520f591). this requires some manual steps like updating ASM libs and install ant builder. so i still commit the prebuilt jarjar in this pr. - [updates] force casting for `UpdateEntity` to deal with kotlin smart casting from versioned to unversioned kernel class. (i'll leave inline comment for this) - [expo-modules-core's `android-annotation`] the project stays in a place that does not support versioning yet. in this pr i just keep it as an unversionable project. cc @lukmccall # Test Plan `et add-sdk -p android -s 49.0.0` + android versioned expo-go + sdk 49 NCL smoke test
show more ...
[tools] Update android versioning script for sdk 47 (#19518)# Why update android versioning script for sdk 47 # How - [android] update gradle wrapper version to 7.5.1, which aligned with r
[tools] Update android versioning script for sdk 47 (#19518)# Why update android versioning script for sdk 47 # How - [android] update gradle wrapper version to 7.5.1, which aligned with react-native 0.70 - [localization] fix compileSdkVersion 33 build error - [tools] update versioning script - remove `renameHermesEngine` which is deprecated patchelf based hermes versioning - replace duplicated runReactNativeCodegenAndroidAsync with `Codegen.runReactNativeCodegenAsync` - update versioning script to support building in-place from react-native-lab - update for react-native 0.70 - update versionCxx for expo-modules-core - support other new style vendoring modules - @react-native-community/slider - react-native-gesture-handler (with cxx files but they're only for new architecture) - react-native-screens (with cxx files but they're only for new architecture) - react-native-svg - react-native-reanimated (with cxx files) - remove old reanimated versioning scripts # Test Plan ``` $ et add-sdk -p android -s 47.0.0 $ cd android && ./gradlew :app:installVersionedDebug # smoke test on sdk 47 NCL ```
[versioning][android] Support react-native 69 (#18032)* [skip ci] suppoort rn69 * version expo-modules-core * review feedback + small cleanup
[android][ios] Upgrade expo go to react-native 0.68 (#16752)# Why upgrade for sdk 45 # How - upgrade our react-native fork to 0.68 based: https://github.com/expo/react-native/tree/sdk-45
[android][ios] Upgrade expo go to react-native 0.68 (#16752)# Why upgrade for sdk 45 # How - upgrade our react-native fork to 0.68 based: https://github.com/expo/react-native/tree/sdk-45 - migrate android/ios projects to 0.68 - [android] bump `targetSdkVersion` and `compileSdkVersion` to 31 (aligned with react-native 0.68) - [tools] update codegen customization in `update-rn` script - [tools] update versioning scripts - [android] replace our customized `NDK_ABI_FILTERS` with official supported `reactNativeArchitectures` gradle property - [android] use jdk 11 that is a huge pr because of changes from `et update-rn`. recommend to review this pr by commits. most `add-sdk` problems on 0.68 are fixed. there are still an issue on android. i'll address in another pr. - expo-av CMakeLists.txt versioning # Test Plan - unversoned android expo-go + ncl - unversoned ios expo-go + ncl - `et add-sdk -p ios -s 45.0.0` + versioned ios sdk 45 expo-go + ncl - `et add-sdk -p android -s 45.0.0` + versioned android sdk 45 expo-go + ncl (should commented out expo-av in `ExperiencePackagePicker.kt`
[android][ios] Fix versioning for expo go after react-native 0.67.2 upgrade (#16401)# Why for sdk45 and based on #16400 # How - [tools] Fix versioning tools for react-native 0.67.2 upgrade
[android][ios] Fix versioning for expo go after react-native 0.67.2 upgrade (#16401)# Why for sdk45 and based on #16400 # How - [tools] Fix versioning tools for react-native 0.67.2 upgrade - [expo-modules-core][ios] Fix missing `EX` prefix to some objective-c files for versioning support - [autolinking] Apply our cocoapods fix for `React-Core` swift support to versioned code - [expo-updates] fix an incompatible `ReactInstanceManager` in UpdatesPackage where UpdateController is unversioned but UpdatePackage is versioned. - [expo-file-system] okhttp/okio code for new versioned code build successfully. this is done in #16446 # Test Plan - `et add-sdk -p android -s 45.0.0` and build/launch sdk 45 expo go with sdk 45 ncl - `et add-sdk -p ios -s 45.0.0` and build/launch sdk 45 expo go with sdk 45 ncl
[android] Remove accidentally commited versioned-react-native files
[android] add sdk 44 (#15434)
[ios][android] Cherry-pick versioned code for SDK43 (#14621)Co-authored-by: Tomasz Sapeta <[email protected]> Co-authored-by: Kudo Chien <[email protected]> Co-authored-by: Brent Vatne
[ios][android] Cherry-pick versioned code for SDK43 (#14621)Co-authored-by: Tomasz Sapeta <[email protected]> Co-authored-by: Kudo Chien <[email protected]> Co-authored-by: Brent Vatne <[email protected]> Co-authored-by: Charlie Cruzan <[email protected]> Co-authored-by: Will Schurman <[email protected]> Co-authored-by: Kudo Chien <[email protected]>
[android] Update Gradle to 6.9 (#13929)
[sdk-42] Cherrypick versioned iOS and Android (#13343)Co-authored-by: cruzach <[email protected]> Co-authored-by: jkh <[email protected]> Co-authored-by: andy <[email protected].
[sdk-42] Cherrypick versioned iOS and Android (#13343)Co-authored-by: cruzach <[email protected]> Co-authored-by: jkh <[email protected]> Co-authored-by: andy <[email protected]>
[android] add sdk 41
[android] Add missing gradle plugin for versioned react native
[android] Upgrade gradle to 6.8 for versioned react native
[Android] Switch to Android SDK 30 & update gradle (#11647)# Why We want to switch to Android SDK 30. # How - [x] I've bumped `targetSdkVersion` to `30` - [x] I've bumped `compileSdkVersi
[Android] Switch to Android SDK 30 & update gradle (#11647)# Why We want to switch to Android SDK 30. # How - [x] I've bumped `targetSdkVersion` to `30` - [x] I've bumped `compileSdkVersion` to `30` - [x] I've fixed nullability issues coming from # Test Plan - [x] compiled & run Expo Go on Android SDK 30 simulator - [x] compiled & run `bare-expo` on Android SDK 30 simulator - [x] launched `ncl` in Expo Go and played for a while # CHANGES - [Android] Update gradle to 6.8 & gradlePlugin to 4.1.1 - [Android] Bump targerSdkVersion and compileSdkVersion to 30 - [Android] Bump kotlin plugin version to 1.4.21 - [Android] Fix & unify ANDROID_NDK_HOME path detection - [react-native][Android][submodule update] Rename ANDROID_NDK to ANDROID_NDK_HOME
[android] Add ABI 40 without development client
[android] add SDK 39 (#9970)
[react-native] Upgrade to 0.63.2 (#9162)* Use react-native/sdk-39 branch * Use [email protected], [email protected], [email protected] * Updated podfiles * bare-expo pod install * Remove
[react-native] Upgrade to 0.63.2 (#9162)* Use react-native/sdk-39 branch * Use [email protected], [email protected], [email protected] * Updated podfiles * bare-expo pod install * Remove unused template properties from bare-expo android * [WIP] Folly * exponent pod install * [android] Cast ids to int in transformer * [WIP] upgrade android * et update-react-native * [ios] Add upstream AsyncStorage module to bare project - Same as RNTester does in https://github.com/expo/react-native/commit/bd1396034319e6e59f960fac7aeca1f483c2052d - This fixes the error: `Error: Requiring module "../../react-native-lab/react-native/Libraries/Storage/AsyncStorage.js", which threw an exception: TypeError: null is not an object (evaluating 'RCTAsyncStorage.multiMerge')` * [android] Fix Linking and AsyncStorage client bug * Upgrade react-native-web * Upgrade react-native * et update-react-native * pod install * pod-install client * Update yarn.lock * pod install * Try folly fix proposed in https://github.com/facebook/react-native/issues/28298 * [ReactAndroid] Use folly patch https://github.com/facebook/react-native/issues/28298 * pod-install * pod install
[android] Swap std::ostringstream usage for std::to_string (#8542)# Why Eric reported native crashes when running older experiences on Expo client after RN 0.62 upgrade. # How The first pr
[android] Swap std::ostringstream usage for std::to_string (#8542)# Why Eric reported native crashes when running older experiences on Expo client after RN 0.62 upgrade. # How The first problem I had was reproducing it — after some testing @wkozyra95, @tsapeta and I realized it was only happening on Android 10. [The stacktrace](https://gist.github.com/sjchmiela/5cb3c90bb65847c42cfcbe7a88f8d812) didn't show too much information, but there was the most interesting part: ``` 2020-05-28 11:19:42.552 25672-25672/? A/DEBUG: #07 pc 000b6d6c /data/app/host.exp.exponent-ikw7l6wjtBDnnLdjc-HnfQ==/lib/x86/libfbjni.so (__cxa_throw+108) (BuildId: 3546c1351f83366cb88b3802c4c63ee907e2db98) 2020-05-28 11:19:42.552 25672-25672/? A/DEBUG: #08 pc 0007f919 /data/app/host.exp.exponent-ikw7l6wjtBDnnLdjc-HnfQ==/lib/x86/libc++_shared.so (std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const+217) (BuildId: 4824c9732515c02a2d10dbd0aff9cfee79138cbe) 2020-05-28 11:19:42.552 25672-25672/? A/DEBUG: #09 pc 00027924 /data/app/host.exp.exponent-ikw7l6wjtBDnnLdjc-HnfQ==/lib/x86/libjscexecutor_abi37_0_0.so (std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char>>::operator<<(void const*)+148) (BuildId: 6f33b70e6648e4230566cae72b44d88a308d2dd8) 2020-05-28 11:19:42.552 25672-25672/? A/DEBUG: #10 pc 00024557 /data/app/host.exp.exponent-ikw7l6wjtBDnnLdjc-HnfQ==/lib/x86/libjscexecutor_abi37_0_0.so (facebook::jsc::JSCRuntime::description()+407) (BuildId: 6f33b70e6648e4230566cae72b44d88a308d2dd8) ``` It looked like it threw a native exception when… building a description for `JSCRuntime`. The implementation of this method is: ```cpp std::string JSCRuntime::description() { if (desc_.empty()) { desc_ = std::string("<JSCRuntime@") + to_string(this) + ">"; } return desc_; } ``` where `to_string` is defined as ```cpp // std::string utility namespace { std::string to_string(void* value) { std::ostringstream ss; ss << value; return ss.str(); } } // namespace ``` The `use_facet` methods from `c++_shared` aren't very helpful either: ```cpp const locale::facet* locale::__imp::use_facet(long id) const { #ifndef _LIBCPP_NO_EXCEPTIONS if (!has_facet(id)) throw bad_cast(); #endif // _LIBCPP_NO_EXCEPTIONS return facets_[static_cast<size_t>(id)]; } const locale::facet* locale::use_facet(id& x) const { return __locale_->use_facet(x.__get()); } ``` Then, fortunately, I realized I saw a PR removing `std::stream` usage recently — https://github.com/expo/expo/pull/8352. I decided to follow its example and see whether changing: ```diff std::string JSCRuntime::description() { if (desc_.empty()) { - desc_ = std::string("<JSCRuntime@") + to_string(this) + ">"; + desc_ = std::string("<JSCRuntime@") + std::to_string(reinterpret_cast<std::uintptr_t>(this)) + ">"; } return desc_; } ``` could let the crash go, so I checked out the `sdk-37` branch, applied the change, rebuilt the `host.exp.reactandroid-abi37_0_0`, copied `maven` folder, checked out `master`, pasted `maven` folder, rebuilt Expo client and lo and behold, SDK 37 didn't crash anymore! Opening SDK36 experience didn't crash anymore either! Then I started testing more and I realized Expo client still crashed if the first experience opened after running the app was a not-patched SDK (eg. SDK36). So I went on and applied the fix for all other SDKs. I also tried building projects with newer NDK (RN 0.62 uses r19c, this didn't help either). If I understand the problem correctly, only one version of some _symbol_ is used in Expo client—the one that is loaded first. For some reason the version loaded by unversioned Home doesn't count. Moreover, `<<`-ing to `std::ostringstream` may cause bugs in some circumstances. I understand that this may fix the problem and nobody will experience any crash whatsoever anymore or this may fix only one probable cause of crashes and we only QA and users may figure out whether it's safe now. Thanks to @wkozyra95 for assistance and answers during the whole day! # Test Plan Running Expo client on Android 10 emulator does not cause a crash anymore no matter experience of which SDK is run first.
[react-native] Upgrade to 0.62.2 (#8310)# Why Let's have latest React Native in the upcoming SDK! # How See the story at https://www.notion.so/expo/React-Native-Upgrade-Diary-947bc0b506a94
[react-native] Upgrade to 0.62.2 (#8310)# Why Let's have latest React Native in the upcoming SDK! # How See the story at https://www.notion.so/expo/React-Native-Upgrade-Diary-947bc0b506a942189fd47ff6e53bf95b. # Test Plan Expo Client runs, versioned SDK38 also runs (after a couple of post-version fixes outlined in the aforementioned doc). `expo-cli` can't handle `client_log` events, but that's something we may want to figure out after merging this PR, I guess.
[android] add SDK 37
[android] add sdk 36
[android][versioned-react-native] upgrade gradle to 5.6.3 to match rest of repo
[Android] Update gradle to 5.6.3 & butterknife to 10.2.0 (#6045)
[android][gradle] Upgrade Gradle and Android Studio (#5695)# Why Fixes https://github.com/expo/expo/issues/5654 and https://github.com/expo/expo/issues/4577. # How - upgraded Android Studi
[android][gradle] Upgrade Gradle and Android Studio (#5695)# Why Fixes https://github.com/expo/expo/issues/5654 and https://github.com/expo/expo/issues/4577. # How - upgraded Android Studio - upgraded Gradle - fixed `generateDynamicMacros` task - fixed `react-native` problem on RN 0.60+ by adapting @brentvatne's solution to Expo client project # Test Plan Expo client compiled.
[android] add abi35_0_0
123