Commit c861b506 by olly Committed by Oliver Woodman

OkHttp extension - Improved configuration

- Upgrade to latest version
- Use api dependency, since application code that uses the
  extension more has to use OkHttp directly to make an
  OkHttpClient instance
- Add proguard configuration

Issue #4059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191422594
parent 5f03c375
...@@ -21,6 +21,7 @@ android { ...@@ -21,6 +21,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion project.ext.minSdkVersion minSdkVersion project.ext.minSdkVersion
targetSdkVersion project.ext.targetSdkVersion targetSdkVersion project.ext.targetSdkVersion
consumerProguardFiles 'proguard-rules.txt'
} }
lintOptions { lintOptions {
...@@ -32,7 +33,7 @@ android { ...@@ -32,7 +33,7 @@ android {
dependencies { dependencies {
implementation project(modulePrefix + 'library-core') implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion implementation 'com.android.support:support-annotations:' + supportLibraryVersion
implementation('com.squareup.okhttp3:okhttp:3.9.0') { api('com.squareup.okhttp3:okhttp:3.10.0') {
exclude group: 'org.json' exclude group: 'org.json'
} }
} }
......
# Proguard rules specific to the OkHttp extension.
# Options specified by https://github.com/square/okhttp/blob/master/README.md
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn javax.annotation.**
-dontwarn org.conscrypt.**
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment