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
@@ -6,8 +6,8 @@ android_prebuilt_aar(
remote_file(
name = 'fresco-binary-aar',
url = 'mvn:com.facebook.fresco:fresco:aar:0.8.1',
sha1 = 'f0a4f04318123e1597514b2abf56b7e66581f3f8',
url = 'mvn:com.facebook.fresco:fresco:aar:0.10.0',
sha1 = '8576630feea3d08eb681dec389a472623179f84d',
)
android_prebuilt_aar(
@@ -18,19 +18,31 @@ android_prebuilt_aar(
remote_file(
name = 'drawee-binary-aar',
url = 'mvn:com.facebook.fresco:drawee:aar:0.8.1',
sha1 = 'a944015ddf50fdad79302e42a85a351633c24472',
url = 'mvn:com.facebook.fresco:drawee:aar:0.10.0',
sha1 = 'c594f9c23f844d08ecd4c0e42df40d80767d4b18',
)
android_library(
name = 'imagepipeline',
exported_deps = [
':imagepipeline-base',
':imagepipeline-core',
':bolts',
],
visibility = ['//ReactAndroid/...',],
)
android_prebuilt_aar(
name = 'imagepipeline-base',
aar = ':imagepipeline-base-aar',
visibility = ['//ReactAndroid/...',],
)
remote_file(
name = 'imagepipeline-base-aar',
url = 'mvn:com.facebook.fresco:imagepipeline-base:aar:0.10.0',
sha1 = '1390f28d0e4f16b0008fed481eb1b107d93f35b8',
)
android_prebuilt_aar(
name = 'imagepipeline-core',
@@ -40,8 +52,8 @@ android_prebuilt_aar(
remote_file(
name = 'imagepipeline-aar',
url = 'mvn:com.facebook.fresco:imagepipeline:aar:0.8.1',
sha1 = '93fe3e629c03aea8f63dabd80a0e616b0caef65b',
url = 'mvn:com.facebook.fresco:imagepipeline:aar:0.10.0',
sha1 = 'ecec308b714039dd9e0cf4b7595a427765f43a01',
)
prebuilt_jar(
@@ -64,18 +76,18 @@ android_prebuilt_aar(
remote_file(
name = 'fbcore-aar',
url = 'mvn:com.facebook.fresco:fbcore:aar:0.8.1',
sha1 = 'cc46b3d564139bf63bb41534c7a723ee8119ae5f',
url = 'mvn:com.facebook.fresco:fbcore:aar:0.10.0',
sha1 = '4650dd9a46064c254e0468bba23804e8f32e6144',
)
android_prebuilt_aar(
name = 'imagepipeline-okhttp',
aar = ':imagepipeline-okhttp-binary-aar',
name = 'imagepipeline-okhttp3',
aar = ':imagepipeline-okhttp3-binary-aar',
visibility = ['//ReactAndroid/...',],
)
remote_file(
name = 'imagepipeline-okhttp-binary-aar',
url = 'mvn:com.facebook.fresco:imagepipeline-okhttp:aar:0.8.1',
sha1 = 'd6b16dbaab8b810620347355a425fb2982e33ef8',
name = 'imagepipeline-okhttp3-binary-aar',
url = 'mvn:com.facebook.fresco:imagepipeline-okhttp3:aar:0.10.0',
sha1 = 'a3e95483f116b528bdf2d06f7ff2212cb9b372e2',
)