Skip to content

Commit

Permalink
Use OkHttp 3 as the sole shipping Downloader.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Jan 4, 2017
1 parent dd6e496 commit 6f7f14d
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 609 deletions.
7 changes: 3 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ ext {
targetSdkVersion = 25
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
okhttp3Version = '3.0.1'
okhttpVersion = '3.0.1'
supportLibrariesVersion = '25.1.0'

dep = [
androidPlugin : 'com.android.tools.build:gradle:2.1.3',
okhttp : 'com.squareup.okhttp:okhttp:2.7.1',
okhttp3 : "com.squareup.okhttp3:okhttp:$okhttp3Version",
mockWebServer : "com.squareup.okhttp3:mockwebserver:$okhttp3Version",
okhttp : "com.squareup.okhttp3:okhttp:$okhttpVersion",
mockWebServer : "com.squareup.okhttp3:mockwebserver:$okhttpVersion",
pollexor : 'com.squareup:pollexor:2.0.4',
supportV4 : "com.android.support:support-v4:$supportLibrariesVersion",
supportAnnotations : "com.android.support:support-annotations:$supportLibrariesVersion",
Expand Down
1 change: 1 addition & 0 deletions picasso-pollexor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ android {
lintOptions {
textOutput 'stdout'
textReport true
lintConfig file('lint.xml')
}

dexOptions {
Expand Down
6 changes: 6 additions & 0 deletions picasso-pollexor/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="InvalidPackage" severity="error">
<ignore regexp="okio-.*jar"/>
</issue>
</lint>
1 change: 0 additions & 1 deletion picasso-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ buildscript {
apply plugin: 'com.android.application'

dependencies {
compile dep.okhttp
compile dep.supportV4
compile dep.supportAnnotations
compile project(':picasso')
Expand Down
4 changes: 2 additions & 2 deletions picasso/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ android {
lintOptions {
textOutput 'stdout'
textReport true
lintConfig file('lint.xml')
}

dexOptions {
Expand All @@ -32,8 +33,7 @@ android {
}

dependencies {
provided dep.okhttp
provided dep.okhttp3
compile dep.okhttp
compile dep.supportAnnotations
testCompile dep.junit
testCompile dep.fest
Expand Down
6 changes: 6 additions & 0 deletions picasso/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="InvalidPackage" severity="error">
<ignore regexp="okio-.*jar"/>
</issue>
</lint>
144 changes: 0 additions & 144 deletions picasso/src/main/java/com/squareup/picasso/OkHttpDownloader.java

This file was deleted.

2 changes: 1 addition & 1 deletion picasso/src/main/java/com/squareup/picasso/Picasso.java
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ public Picasso build() {
Context context = this.context;

if (downloader == null) {
downloader = Utils.createDefaultDownloader(context);
downloader = new OkHttp3Downloader(context);
}
if (cache == null) {
cache = new LruCache(context);
Expand Down

This file was deleted.

Loading

0 comments on commit 6f7f14d

Please sign in to comment.