Upgrade to OkHttp3

Summary:
Update to [OkHttp](https://github.com/square/okhttp) to [OkHttp3](https://publicobject.com/2015/12/12/com-squareup-okhttp3/)

We must also update:
- Fresco to 0.10.0
- okio to 1.8.0

**Motivation**
Reasons for upgrading:
* Issue #4021
* "We discovered that RN Android sometimes fails to connect to the latest stable version of NGINX when HTTP/2 is enabled. We aren't seeing errors with other HTTP clients so we think it's specific to RN and OkHttp. Square has fixed several HTTP/2 bugs over the past eight months." - ide
* OkHttp3 will be maintained & improved, but OkHttp2 will only receive [security fixes](https://publicobject.com/2016/02/11/okhttp-certificate-pinning-vulnerability/)
* Cleaner APIs - "Get and Set prefixes are avoided"
* Deprecated/Removed - HttpURLConnection & Apache HTTP
* React Native apps are currently being forced to bundle two versions of OkHttp (v2 & v3), if another library uses v3
* Improved WebSocket performance - [CHANGELOG.md](https://github.com/square/okhttp/blob/master
Closes https://github.com/facebook/react-native/pull/6113

Reviewed By: andreicoman11, lexs

Differential Revision: D3292375

Pulled By: bestander

fbshipit-source-id: 7c7043eaa2ea63f95854108b401c4066098d67f7
This commit is contained in:
Andrew Jack
2016-05-17 12:37:50 -07:00
committed by Facebook Github Bot 1
parent 5047f6f54c
commit 6bbaff2944
29 changed files with 378 additions and 273 deletions

View File

@@ -1,23 +1,35 @@
prebuilt_jar(
name = 'okhttp',
binary_jar = ':okhttp-binary-jar',
name = 'okhttp3',
binary_jar = ':okhttp3-binary-jar',
visibility = ['//ReactAndroid/...',],
)
remote_file(
name = 'okhttp-binary-jar',
url = 'mvn:com.squareup.okhttp:okhttp:jar:2.5.0',
sha1 = '4de2b4ed3445c37ec1720a7d214712e845a24636'
name = 'okhttp3-binary-jar',
url = 'mvn:com.squareup.okhttp3:okhttp:jar:3.2.0',
sha1 = 'f7873a2ebde246a45c2a8d6f3247108b4c88a879'
)
prebuilt_jar(
name = 'okhttp-ws',
binary_jar = ':okhttp-ws-binary-jar',
name = 'okhttp3-urlconnection',
binary_jar = ':okhttp3-urlconnection-binary-jar',
visibility = ['//ReactAndroid/...',],
)
remote_file(
name = 'okhttp3-urlconnection-binary-jar',
url = 'mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:3.2.0',
sha1 = '6f8a4b1435c9e0a6f9c5fe4a1be46627b848fd0c'
)
prebuilt_jar(
name = 'okhttp3-ws',
binary_jar = ':okhttp3-ws-binary-jar',
visibility = ['//ReactAndroid/...',],
)
remote_file(
name = 'okhttp-ws-binary-jar',
url = 'mvn:com.squareup.okhttp:okhttp-ws:jar:2.5.0',
sha1 = '0e9753b7dcae5deca92e871c5c759067070b07bc',
name = 'okhttp3-ws-binary-jar',
url = 'mvn:com.squareup.okhttp3:okhttp-ws:jar:3.2.0',
sha1 = '1ea229d6984444c8c58b8e97ba4c8429d9d135b3',
)

View File

@@ -6,6 +6,6 @@ prebuilt_jar(
remote_file(
name = 'okio-binary-jar',
url = 'mvn:com.squareup.okio:okio:jar:1.6.0',
sha1 = '98476622f10715998eacf9240d6b479f12c66143',
url = 'mvn:com.squareup.okio:okio:jar:1.8.0',
sha1 = '05ea7af56cc7c567ed9856d99efb30740e9b17ff',
)