Merge pull request #2105 from connyduck/remove_okhttp
remove okhttp dependency from runtime classpath to save appsize
This commit is contained in:
commit
ffa4c02f63
|
@ -87,7 +87,11 @@ dependencies {
|
||||||
implementation 'com.google.vr:sdk-videowidget:1.180.0'
|
implementation 'com.google.vr:sdk-videowidget:1.180.0'
|
||||||
implementation 'org.apache.sanselan:sanselan:0.97-incubator'
|
implementation 'org.apache.sanselan:sanselan:0.97-incubator'
|
||||||
implementation 'info.androidhive:imagefilters:1.0.7'
|
implementation 'info.androidhive:imagefilters:1.0.7'
|
||||||
implementation 'com.squareup.picasso:picasso:2.71828'
|
implementation('com.squareup.picasso:picasso:2.71828') {
|
||||||
|
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
|
||||||
|
}
|
||||||
|
compileOnly 'com.squareup.okhttp3:okhttp:4.9.0'
|
||||||
|
implementation 'com.squareup.okio:okio:2.10.0'
|
||||||
implementation 'com.caverock:androidsvg-aar:1.4'
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
||||||
implementation 'com.github.tibbi:gestureviews:a8e8fa8d27'
|
implementation 'com.github.tibbi:gestureviews:a8e8fa8d27'
|
||||||
implementation 'com.github.tibbi:subsampling-scale-image-view:961f7b5f2d'
|
implementation 'com.github.tibbi:subsampling-scale-image-view:961f7b5f2d'
|
||||||
|
|
|
@ -3,11 +3,23 @@ package com.simplemobiletools.gallery.pro
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import com.github.ajalt.reprint.core.Reprint
|
import com.github.ajalt.reprint.core.Reprint
|
||||||
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
||||||
|
import com.squareup.picasso.Downloader
|
||||||
|
import com.squareup.picasso.Picasso
|
||||||
|
import okhttp3.Response
|
||||||
|
|
||||||
class App : Application() {
|
class App : Application() {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
checkUseEnglish()
|
checkUseEnglish()
|
||||||
Reprint.initialize(this)
|
Reprint.initialize(this)
|
||||||
|
Picasso.setSingletonInstance(Picasso.Builder(this).downloader(object: Downloader {
|
||||||
|
override fun load(request: okhttp3.Request): Response {
|
||||||
|
return Response.Builder().build()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun shutdown() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}).build())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue