Summary:
This cleans up a bit our dependency list inside `ReactAndroid`. I've re-sorted the lists, and exported everything I could in the `gradle.properties`.
I wish we could move to the Gradle Version Catalog for Android, but that's not possible at the moment (it will make impossible for users to build from source).
## Changelog
[Internal] - Cleanup some of the dependencies inside ReactAndroid
Pull Request resolved: https://github.com/facebook/react-native/pull/34191
Test Plan: Will rely on a Green CircleCI
Reviewed By: huntie
Differential Revision: D37828614
Pulled By: cortinico
fbshipit-source-id: f433d08d691db4145e0c72ca4dab2f0350e4101f
Summary:
Bumping RTC-Folly version used to address CVE-2022-24440.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General][Security] - Bump RTC-Folly to 2021-07-22
Pull Request resolved: https://github.com/facebook/react-native/pull/33841
Reviewed By: Andjeliko, philIip
Differential Revision: D36425598
Pulled By: cortinico
fbshipit-source-id: d38c5f020dbecf794b10f12ed2da30e1825071af
Summary:
The reason why I'm working on this is to reduce the delta between this and the react-native-macos fork, in particular with the android patch folder "Build": https://github.com/microsoft/react-native-macos/tree/main/android-patches/patches/Build (it's a long story)
While checking the changes in there, I noticed that one of them was a bump of boost. Looking back into main (here), I then noticed that there have been two bumps to boot in the repo so far:
* a combo update 5 years ago to 1.63:
* 193afff926
* 5c24a9110a
* and an update for the iOS side to 1.76 by Kudo last year: https://github.com/facebook/react-native/pull/31840
So this quickly turned into this: the PR wants to re-align the version of boost used in both iOS and Android.
I explored the option of bumping both to 1.78 (latest at the time of writing: https://www.boost.org/users/history/version_1_78_0.html) but then I noticed that there's a Flipper dependency, `Flipper-Boost-iOSX`, on the iOS pods side that has been released only once and it seems to imply that it's 1.76 only compatible https://github.com/priteshrnandgaonkar/Flipper-Boost-iOSX/releases/tag/1.76.0.1.11.
So going to 1.78 at least for now seems like a no-go, and I've settled for just aligning everything to 1.76 and just like iOS, move away from `boost-for-react-native` in favour of the original one.
While doing so, I also noticed that the `React/third-party.xcconfig` still had a reference to 1.68 instead of 1.76 which seems like a leftover from Kudo's PR... it's probably because it was not doing anything in the first place, so lmk if you want me to delete it.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Android] [Changed] - Bump boost for Android to 1.76 to align with iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/33565
Test Plan:
CI is green (aside an unrelated ios rntester job that is also broken on main) ✅
Locally both RNTester and new app work:
<img width="432" alt="Screenshot 2022-04-05 at 16 42 31" src="https://user-images.githubusercontent.com/16104054/161815444-0de63919-b90d-4a48-963a-872f0cc4ce79.png">
<img width="346" alt="Screenshot 2022-04-05 at 18 06 01" src="https://user-images.githubusercontent.com/16104054/161815438-b7b1c997-9dcd-47bd-acbe-732155941bb0.png">
Reviewed By: sshic
Differential Revision: D35433032
Pulled By: cortinico
fbshipit-source-id: 0d93f61f8c26eda1dd04127a8b20e799ab6828cb
Summary:
Currently we are using Appcompat in version 1.0.2 which is almost 4 years old now, this PR updates it to version 1.4.1.
Using Appcompat 1.0.2 was also causing a crash on RNTester due to an error where FontFamily's method was not found (Related to https://github.com/facebook/react-native/issues/33065)
Closes https://github.com/facebook/react-native/issues/31620
## Changelog
[Android] [Changed] - Bump android Appcompat to 1.4.1
Pull Request resolved: https://github.com/facebook/react-native/pull/33072
Test Plan: Use `./scripts/test-manual-e2e.sh` to test both RNTester and a new app
Reviewed By: cortinico
Differential Revision: D34107105
Pulled By: ShikaSD
fbshipit-source-id: 966e4687b09ae50a88ee518622f073d72e8c6550
Summary:
Updates documentation in React Native to reference `main` (or `HEAD` for URLs) instead of `master`.
Part of https://github.com/facebook/react-native/issues/31788.
Changelog:
[General][Changed] - Update documentation reference from `master` to `main` or `HEAD`.
Reviewed By: JoshuaGross
Differential Revision: D29717128
fbshipit-source-id: 0b0babd8407c6fd3d0e5431f6eaf976059731d6f
Summary:
Douring our routine crash report check we are occasionally seeing reports of exceptions like this in the wild from our crash stack:
```
java.lang.NullPointerException: bio == null
at com.android.org.conscrypt.NativeCrypto.SSL_pending_written_bytes_in_BIO(NativeCrypto.java)
at com.android.org.conscrypt.NativeSsl$BioWrapper.getPendingWrittenBytes(NativeSsl.java:660)
at com.android.org.conscrypt.ConscryptEngine.pendingOutboundEncryptedBytes(ConscryptEngine.java:566)
at com.android.org.conscrypt.ConscryptEngineSocket.drainOutgoingQueue(ConscryptEngineSocket.java:584)
at com.android.org.conscrypt.ConscryptEngineSocket.close(ConscryptEngineSocket.java:480)
at okhttp3.internal.Util.closeQuietly(Util.kt:501)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFile:245)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFile:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFile:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(ExchangeFile:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ExchangeFile:32)
...
```
![Screen Shot 2021-07-07 at 1 38 23 PM](https://user-images.githubusercontent.com/8868908/124711795-b5fee980-df28-11eb-98c4-9668661340b6.png)
This appears to only be happening on devices running Android 10 and 11. This happens because there is concurrency issue in Conscrypt where two threads race to close an SSLEngine-based SSLSocket and access to the underlying BIO is unsynchronized.
**The OkHttp team already released a fix for this issue on version 4.9.1** this PR aims to update our OkHttp package to version 4.9.1.
Related discussion:
[https://issuetracker.google.com/issues/177450597](https://issuetracker.google.com/issues/177450597)
[https://publicobject.com/2021/01/30/bio-null/](https://publicobject.com/2021/01/30/bio-null/)
cc dulmandakh fkgozali
## Changelog
[Android] [Changed] - Bumping OkHttp from 4.9.0 to 4.9.1.
Pull Request resolved: https://github.com/facebook/react-native/pull/31822
Test Plan: Manual & Automated from CI
Reviewed By: fkgozali
Differential Revision: D29590198
Pulled By: ShikaSD
fbshipit-source-id: 4228bfd3472114253e13acb436dc1dd9287a148d
Summary:
Upgrade folly for the https://github.com/facebook/folly/pull/1593 fix for NDK 21 failure
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Android] [Changed] - Upgrade folly to 2021.06.28.00
Pull Request resolved: https://github.com/facebook/react-native/pull/31802
Test Plan:
`./gradlew :ReactAndroid:installArchives`
`./gradlew packages:rn-tester:android:app:installJscRelease`
`./gradlew packages:rn-tester:android:app:installHermesRelease`
Reviewed By: RSNara
Differential Revision: D29547027
Pulled By: ShikaSD
fbshipit-source-id: a10c7c65f459091bd0e7cca750a9b9e067189b73
Summary:
This PR bumps Fresco to 2.5.0, which is first version on MavenCentral since jCenter announcement.
## Changelog
[Android] [Changed] - Bump Fresco to 2.5.0
Pull Request resolved: https://github.com/facebook/react-native/pull/31699
Test Plan: CI is green
Reviewed By: TheSavior
Differential Revision: D29031847
Pulled By: passy
fbshipit-source-id: 486ffbf5461d07d736c0ebe17c0c7726937db344
Summary:
Updates Gradle script to include new version of folly (synced to iOS update)
Adds fmt and libevent as well as some boost ASM sources to enable compilation of folly futures.
Changelog:
[Android] Updated folly to 2021.04.26
Reviewed By: fkgozali
Differential Revision: D28124377
fbshipit-source-id: d44c5a1ded5ee7ad514a9df14ea2ba326d4aa0e3
Summary:
Extends https://github.com/facebook/react-native/pull/30694 to fix tests.
OkHttp v4 was released almost a year ago. Even though v3 is still receiving security and bug fixes, most of the new improvements and features are landing in v4. This PR bumps OkHttp from v3 to v4 and addresses backward-incompatible changes.
Side effects of this upgrade:
- OkHttp v4 depends on Kotlin's standard library, so react-native will have a transitive dependency on it.
- The dex method count of test apk has exceeded the maximum, so multidexing had to be enabled for android tests.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Android] [Changed] - Bumping OkHttp from v3 to v4.
Pull Request resolved: https://github.com/facebook/react-native/pull/31084
Test Plan: Automated (relying on the test suite) and manual testing.
Reviewed By: fkgozali
Differential Revision: D27597430
Pulled By: ShikaSD
fbshipit-source-id: 967379b41c2bcd7cfd4083f65059f5da467b8a91
Summary:
Okhttp 3.12.X allows Connections using TLS 1.0 and TLS1.1.
TLS 1.0 and TLS 1.1 are no longer secure.
Google, Mozilla, Microsoft, and Apple announced that their browsers will require TLSv1.2 or better starting in early 2020.
https://square.github.io/okhttp/changelog_3x/#version-310https://github.com/facebook/react-native/wiki/Changelog
Starting from 3.13.0 TLSv1 and TLSv1.1 are no longer enabled by default.
3.13.0 requires JAVA 8 and Android SDK 21 (which was blocking the Upgrade in the Past).
## Changelog
[Android] [Changed] - Update Okhttp to version 3.14.19
Pull Request resolved: https://github.com/facebook/react-native/pull/30609
Test Plan:
Current tests should pass.
Connections using TLS 1.0 and TLS 1.1 should not be possible.
Reviewed By: mdvacca
Differential Revision: D25843511
Pulled By: fkgozali
fbshipit-source-id: f0b648c8037f945130c6f9983404ee7f75b178cb
Summary:
Bump Okio to 1.17.5, which includes fixes for many bugs and crashes since current version. Also removed android.enableR8=false from gradle.properties because it's deprecated. And moved FEST_ASSERT_CORE_VERSION from gradle.properties to build.gradle because it's used in single line.
## Changelog
[Android] [Changed] - bump Okio to 1.17.5
Pull Request resolved: https://github.com/facebook/react-native/pull/30204
Test Plan: RNTester builds and runs as expected.
Reviewed By: hramos
Differential Revision: D24560711
Pulled By: fkgozali
fbshipit-source-id: 433075293ca2dc41869dbb272d674625639c8b83
Summary:
SoLoader fixed crash on Android 4.1, and includes many improvements and fixes https://github.com/facebook/SoLoader/releases/tag/v0.9.0. Also Fresco 2.3.0 depends on it, and will create a PR soon to bump Fresco.
## Changelog
[Android] [Changed] - Bump SoLoader to 0.9.0
Pull Request resolved: https://github.com/facebook/react-native/pull/29821
Test Plan: CI is green
Reviewed By: fkgozali
Differential Revision: D23477538
Pulled By: mdvacca
fbshipit-source-id: d2d982d5c5c84fc173dc66dfe069713ca90711a8
Summary:
This updates okhttp to the newest compatible version with a couple of fixes and improvements. See https://github.com/square/okhttp/commits/okhttp_3.12.x
## Changelog
[Android] [Changed] - Update Okhttp to version 3.12.12
Pull Request resolved: https://github.com/facebook/react-native/pull/29741
Test Plan: Current tests should pass.
Reviewed By: shergin
Differential Revision: D23406613
Pulled By: mdvacca
fbshipit-source-id: b0b4ec52a6a8345f1c36e18e384761386096f1d8
Summary:
New release with some fixes for RN consumers. See
https://github.com/facebook/SoLoader/releases/tag/v0.8.2
## Changelog
[Android] [Chore] Update SoLoader to 0.8.2
Reviewed By: cpojer
Differential Revision: D19856837
fbshipit-source-id: 77a8fe1aa62db951413931e8a7d5e05325beb24e
Summary:
This PR bumps bumps Soloader to 0.8.0. This fixes white screen/ crash issues when downloading from Google Play.
Related to:
https://github.com/facebook/react-native/issues/25927#26400
## Changelog
[Android] [Changed] - Bump Soloader to 0.8.0
Pull Request resolved: https://github.com/facebook/react-native/pull/26759
Test Plan:
A few CI tests fail, but I don't see the link with what I changed, especially the ios tests.
It's working locally though, and for people on github who tried this solution as well.
Differential Revision: D17828891
Pulled By: mdvacca
fbshipit-source-id: 1c7809aa681b41b8ed9a4da96d041d52f3cfbb76
Summary:
This PR is extracts and reuses ANDROIDX_TEST_VERSION, and is part of Gradle script refactoring effort.
## Changelog
[Android] [Changed] - extract and reuse ANDROIDX_TEST_VERSION
Pull Request resolved: https://github.com/facebook/react-native/pull/26487
Differential Revision: D17488766
Pulled By: mdvacca
fbshipit-source-id: f1968ffc403074d78d792eb5cc773cc6366ad2d1
Summary:
Bump Fresco to 2.0.0, which supports AndroidX. We should cherry-pick to 0.60 release, to support brown field apps but also native components.
## Changelog
[Android] [Changed] - Bump Fresco to 2.0.0, supports AndroidX
Pull Request resolved: https://github.com/facebook/react-native/pull/25358
Test Plan: CI is green, and RNTester builds and runs as expected.
Differential Revision: D15959443
Pulled By: mdvacca
fbshipit-source-id: 58ba2c3e4d1342014d6ea632cd865b4f413548d9
Summary:
This PR bumps Android Gradle Plugin to 3.4.0, which enables R8 shrinker by default and improves build performance significantly.
Disabled R8 for ReactAndroid because it'll strip out AndroidX and other libraries bundled in ReactAndroid.
[Android] [Changed] - bump Android Gradle plugin to 3.4.0
Pull Request resolved: https://github.com/facebook/react-native/pull/24463
Differential Revision: D15107117
Pulled By: hramos
fbshipit-source-id: 35a03dc9955e889c9399faeaf9a862e0fc044fc4
Summary:
In origin approach, we packed libjsc.so inside react-native.aar and it is difficult for user to choose different JSC variants. E.g., [the Intl supported version](https://github.com/react-native-community/jsc-android-buildscripts#international-variant).
This change list allows application to determine JSC versions or variants by npm/yarn package.
There is a |useIntlJsc| flag in build.gradle, it will use the same JSC version but with Intl support.
`yarn add jsc-android@canary`
[Android] [Changed] - Allow application to select different JSC variants
**MIGRATION**
Note that there are some changes in build.gradle.
Existing application needs to change their android/build.gradle and android/app/build.gradle.
Hopefully, the rn-diff-purge should handle the case well.
Pull Request resolved: https://github.com/facebook/react-native/pull/24276
Differential Revision: D14752359
Pulled By: cpojer
fbshipit-source-id: a4bfb135ad8e328f404a2d1a062412f40ebf4622
Summary:
This diff migrates RN to AndroidX.
As part of this diff I disabled few tests in RNAndroid OSS that will be re-enabled this week. As part of the refactor of BUCK files in OSS
Reviewed By: shergin
Differential Revision: D14200097
fbshipit-source-id: 932fcae251d1553e672acd67ecd0e703dcb364aa
Summary:
Bump soloader to 0.6.0, which added support for App Bundling and help reduce app size.
[Android] [Changed] - Bump Soloader to 0.6.0
CI is green and everything works just fine.
Pull Request resolved: https://github.com/facebook/react-native/pull/23239
Differential Revision: D13915901
Pulled By: cpojer
fbshipit-source-id: 917705326b76fc3356828e5d00e6148e292bd12a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/22231
- Use clang instead of the deprecated gcc
- Use libc++ instead of the deprecated gnustl
- Updated gradle and android plugin version
- Fixed missing arch in local-cli template
- `clean` task should now always succeed
- `clean` task deletes build artifacts
- No need to specify buildToolsVersion. It's derived.
- Elvis operator for more readable code
Pull Request resolved: https://github.com/facebook/react-native/pull/22263
Reviewed By: hramos
Differential Revision: D13004499
Pulled By: DanielZlotin
fbshipit-source-id: da54bb744cedb4c6f3bda590f8c25d0ad64086ef
Summary:
Fixes#20302 (For Android)
Note:
------
1. New folly will have build break for a gcc-4.9 and gcc-4.9 seems to be deprecated for latest folly.
As we only use partial folly implementations, I just fixed the build break part.
To support building RN on Windows, the patches are written by gradle ReplaceTokens.
2. The change for glog copying header into exported/ is to prevent build break for folly.
`folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21977
Reviewed By: hramos
Differential Revision: D12818133
Pulled By: fkgozali
fbshipit-source-id: 2c1f6f012663204581a86141d0c9ed0eb9d8c698
Summary:
This PR tries to consolidate Android native dependencies versions to make it less error prone to version bumps.
Pull Request resolved: https://github.com/facebook/react-native/pull/20742
Differential Revision: D9818155
Pulled By: hramos
fbshipit-source-id: 9bf631640910edad5731014f4e23dbca45af2b59
Summary:
This is a small missing piece from b6f2aad9c0 and will complete fresco version bump.
Pull Request resolved: https://github.com/facebook/react-native/pull/20580
Differential Revision: D9228658
Pulled By: hramos
fbshipit-source-id: 9cf1509a590cedfe4c3358006cfb62533058e946
Summary:
Gradle unit tests started failing, this PR fixes mockito to be one specific version instead of loose 1.+
**Explain the **motivation** for making this change. What existing problem does the pull request solve?**
Circle CI started failing without any specific reason https://circleci.com/gh/facebook/react-native/tree/master, looks like a dependency error.
Alas it is, I can reproduce the error on master with clean caches.
**Test plan (required)**
After the fix:
```
bestander-pro:react-native bestander$ ./gradlew :ReactAndroid:testDebugUnitTest
Incremental java compilation is an incubating feature.
:ReactAndroid:preBuild UP-TO-DATE
:ReactAndroid:preDebugBuild UP-TO-DATE
:ReactAndroid:checkDebugManifest
:ReactAndroid:preDebugAndroidTestBuild UP-TO-DATE
:ReactAndroid:preDebugUnitTestBuild UP-TO-DATE
:ReactAndroid:preReleaseBuild UP-TO-DATE
:ReactAndroid:preReleaseUnitTestBuild UP-TO-DATE
:ReactAndroid:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:ReactAndroid:prepareComAndro
Closes https://github.com/facebook/react-native/pull/10239
Differential Revision: D3968396
Pulled By: matryoshcow
fbshipit-source-id: 63374261303fb98dc252898dfd5d3b3346597e4f
Summary:- converted shell script `scripts/e2e-test.sh` into JS script to have more programming flexibility
- using appium execute 2 tests after a fresh React Native app installation: check HMR and that debugging mode does not crash the app
- made sure tests can be stable on limited CI systems and added ways to debug any problems in the future
Using appium we can now interact with Android app and test its state.
As a follow up i am planning to write a blog post on how to use appium with android and ios for e2e testing.
Closes https://github.com/facebook/react-native/pull/6840
Differential Revision: D3173635
Pulled By: mkonicek
fb-gh-sync-id: 3cf044bc9f64d1a842ae4589dd1bcab76de3d66a
fbshipit-source-id: 3cf044bc9f64d1a842ae4589dd1bcab76de3d66a
Summary:npm-publish.js is not cohesive enough: besides building and publishing it also modifies some files.
It is better to have a separate script that will bump versions, make a commit and tag it.
scripts/bump-oss-version.js does exactly that.
This simplifies release process and allows manual release to npm if CI is not available.
Closes https://github.com/facebook/react-native/pull/6625
Differential Revision: D3092849
fb-gh-sync-id: 92cf38bd3df31c8c9c433fc5f9e15c129855fe0e
shipit-source-id: 92cf38bd3df31c8c9c433fc5f9e15c129855fe0e
This is an early release and there are several things that are known
not to work if you're porting your iOS app to Android.
See the Known Issues guide on the website.
We will work with the community to reach platform parity with iOS.