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
This commit is contained in:
olly 2018-04-03 04:16:38 -07:00 committed by Oliver Woodman
parent 7171cce92d
commit 783a1b74e3
2 changed files with 10 additions and 1 deletions

View File

@ -21,6 +21,7 @@ android {
defaultConfig {
minSdkVersion project.ext.minSdkVersion
targetSdkVersion project.ext.targetSdkVersion
consumerProguardFiles 'proguard-rules.txt'
}
lintOptions {
@ -32,7 +33,7 @@ android {
dependencies {
implementation project(modulePrefix + 'library-core')
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'
}
}

View File

@ -0,0 +1,8 @@
# 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