Remove okio library (#6972)

This commit is contained in:
ByteHamster 2024-03-09 17:55:07 +01:00 committed by GitHub
parent 755ccc42ec
commit aaf225c7af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 2 additions and 12 deletions

View File

@ -114,7 +114,6 @@ dependencies {
implementation "com.github.bumptech.glide:glide:$glideVersion"
implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"
implementation "com.squareup.okio:okio:$okioVersion"
implementation "org.greenrobot:eventbus:$eventbusVersion"
annotationProcessor "org.greenrobot:eventbus-annotation-processor:$eventbusVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"

View File

@ -30,7 +30,6 @@
# for okhttp
-dontwarn okhttp3.**
-dontwarn okio.**
# android-iconify
-keep class com.joanzapata.** { *; }

View File

@ -102,12 +102,6 @@
website="https://github.com/square/okhttp"
license="Apache 2.0"
licenseText="LICENSE_OKHTTP.txt" />
<library
name="Okio"
author="Square"
website="https://github.com/square/okio"
license="Apache 2.0"
licenseText="LICENSE_APACHE-2.0.txt" />
<library
name="RecyclerViewSwipeDecorator"
author="Paolo Montalto"

View File

@ -28,7 +28,6 @@ project.ext {
jsoupVersion = "1.15.1"
glideVersion = "4.13.2"
okhttpVersion = "3.12.10"
okioVersion = "1.17.5"
eventbusVersion = "3.3.1"
rxAndroidVersion = "2.1.1"
rxJavaVersion = "2.2.2"

View File

@ -59,7 +59,6 @@ dependencies {
implementation "com.github.bumptech.glide:okhttp3-integration:$glideVersion@aar"
implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"
implementation "com.squareup.okio:okio:$okioVersion"
implementation "org.greenrobot:eventbus:$eventbusVersion"
annotationProcessor "org.greenrobot:eventbus-annotation-processor:$eventbusVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"

View File

@ -1,6 +1,6 @@
package de.danoeh.antennapod.core.service.download;
import okio.ByteString;
import android.util.Base64;
import java.io.UnsupportedEncodingException;
@ -9,7 +9,7 @@ public abstract class HttpCredentialEncoder {
try {
String credentials = username + ":" + password;
byte[] bytes = credentials.getBytes(charset);
String encoded = ByteString.of(bytes).base64();
String encoded = Base64.encodeToString(bytes, Base64.NO_WRAP);
return "Basic " + encoded;
} catch (UnsupportedEncodingException e) {
throw new AssertionError(e);