diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4c2c80e30..cd8f29618 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -118,8 +118,7 @@ android { packaging { resources { - excludes += "/META-INF/CHANGES" - excludes += "/META-INF/README.md" + excludes += "/META-INF/**" excludes += "/kotlin/**" excludes += "**.txt" excludes += "**.bin" @@ -214,7 +213,7 @@ dependencies { // https://coil-kt.github.io/coil/changelog/ implementation("io.coil-kt:coil-compose:2.2.2") - implementation("io.ktor:ktor-client-okhttp:2.2.4") + implementation("io.ktor:ktor-client-apache5:2.3.0-eap-619") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4") implementation("org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.5.0") implementation("org.jsoup:jsoup:1.15.4") diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index c57e445f3..77ececcc6 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -15,6 +15,12 @@ # Ktor logger -dontwarn org.slf4j.impl.StaticLoggerBinder +-dontwarn org.ietf.jgss.GSSContext +-dontwarn org.ietf.jgss.GSSCredential +-dontwarn org.ietf.jgss.GSSException +-dontwarn org.ietf.jgss.GSSManager +-dontwarn org.ietf.jgss.GSSName +-dontwarn org.ietf.jgss.Oid -keepattributes LineNumberTable,SourceFile -renamesourcefileattribute SourceFile diff --git a/app/src/main/java/com/hippo/ehviewer/EhApplication.kt b/app/src/main/java/com/hippo/ehviewer/EhApplication.kt index 6a838bb79..251e94397 100644 --- a/app/src/main/java/com/hippo/ehviewer/EhApplication.kt +++ b/app/src/main/java/com/hippo/ehviewer/EhApplication.kt @@ -48,7 +48,7 @@ import eu.kanade.tachiyomi.core.preference.AndroidPreferenceStore import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences import eu.kanade.tachiyomi.util.lang.launchIO import io.ktor.client.HttpClient -import io.ktor.client.engine.okhttp.OkHttp +import io.ktor.client.engine.apache5.Apache5 import kotlinx.coroutines.DelicateCoroutinesApi import okhttp3.Cache import okhttp3.OkHttpClient @@ -246,11 +246,7 @@ class EhApplication : Application(), DefaultLifecycleObserver, ImageLoaderFactor } val ktorClient by lazy { - HttpClient(OkHttp) { - engine { - preconfigured = nonCacheOkHttpClient - } - } + HttpClient(Apache5) } @JvmStatic diff --git a/settings.gradle.kts b/settings.gradle.kts index 103108a90..d99e40034 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,6 +14,7 @@ dependencyResolutionManagement { maven("https://jcenter.bintray.com") maven("https://jitpack.io") maven("https://androidx.dev/storage/compose-compiler/repository/") + maven("https://maven.pkg.jetbrains.space/public/p/ktor/eap") } }