Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: upgrading to OkHttp from v3 to v4 #31084

Closed
wants to merge 9 commits into from

Conversation

arazabishov
Copy link
Contributor

@arazabishov arazabishov commented Mar 2, 2021

Extends #30694 to fix tests.

Summary

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

[Android] [Changed] - Bumping OkHttp from v3 to v4.

Test Plan

Automated (relying on the test suite) and manual testing.

@facebook-github-bot
Copy link
Contributor

Hi @arazabishov!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code analysis results:

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 2, 2021
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@analysis-bot
Copy link

analysis-bot commented Mar 2, 2021

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: a15a46c

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,985,522 +82,152
android hermes armeabi-v7a 8,482,673 +82,143
android hermes x86 9,474,577 +82,166
android hermes x86_64 9,418,656 +82,149
android jsc arm64-v8a 10,719,547 +82,149
android jsc armeabi-v7a 10,199,802 +82,139
android jsc x86 10,770,110 +82,173
android jsc x86_64 11,354,452 +82,148

Base commit: cbe7c44

@arazabishov arazabishov changed the title (WIP): Upgrading to OkHttp v4 Android: upgrading to OkHttp from v3 to v4 Mar 11, 2021
@kelset kelset added the p: Microsoft Partner: Microsoft label Mar 11, 2021
@kelset kelset requested a review from dulmandakh March 11, 2021 11:34
Copy link
Contributor

@dulmandakh dulmandakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dulmandakh
Copy link
Contributor

I'm happy that this PR would open door to more Kotlin code in RN.

@nelsonprsousa
Copy link

nelsonprsousa commented Apr 5, 2021

@dulmandakh any idea if this will end up in the next RN release? Upgrading to v4.x wasn't possible until now because okhttp only works on API level 21+ (Android 5.0+), but since 0.64.0 I believe this is no longer a problem.

We are seeing a bunch of stability warning reports on Google Play console. Most of them okhttp3 related. Not sure if this affects ASO in any way, tho.

@facebook-github-bot
Copy link
Contributor

@fkgozali has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ShikaSD merged this pull request in 8207e97.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Microsoft Partner: Microsoft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants