summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-03-09 17:55:07 +0100
committerGitHub <noreply@github.com>2024-03-09 17:55:07 +0100
commitaaf225c7aff4e204c46f5a12663d097b967626cb (patch)
tree6ae577ae804f4d98fe4a08b661a1be13e28d5986
parent755ccc42ece9fe30ebc989d80e9a846fa8e814f7 (diff)
downloadAntennaPod-aaf225c7aff4e204c46f5a12663d097b967626cb.zip
Remove okio library (#6972)
-rw-r--r--app/build.gradle1
-rw-r--r--app/proguard.cfg1
-rw-r--r--app/src/main/assets/licenses.xml6
-rw-r--r--build.gradle1
-rw-r--r--core/build.gradle1
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/HttpCredentialEncoder.java4
6 files changed, 2 insertions, 12 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 18855d7ab..f2d6f0249 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -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"
diff --git a/app/proguard.cfg b/app/proguard.cfg
index 57c5ca9dc..634988e49 100644
--- a/app/proguard.cfg
+++ b/app/proguard.cfg
@@ -30,7 +30,6 @@
# for okhttp
-dontwarn okhttp3.**
--dontwarn okio.**
# android-iconify
-keep class com.joanzapata.** { *; }
diff --git a/app/src/main/assets/licenses.xml b/app/src/main/assets/licenses.xml
index 2af54bda5..db5f93c1e 100644
--- a/app/src/main/assets/licenses.xml
+++ b/app/src/main/assets/licenses.xml
@@ -103,12 +103,6 @@
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"
website="https://github.com/xabaras/RecyclerViewSwipeDecorator"
diff --git a/build.gradle b/build.gradle
index b461fe547..4afbb3803 100644
--- a/build.gradle
+++ b/build.gradle
@@ -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"
diff --git a/core/build.gradle b/core/build.gradle
index e9b498fc6..2aec8e76f 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -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"
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpCredentialEncoder.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpCredentialEncoder.java
index c1b63e873..9866f91b6 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpCredentialEncoder.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpCredentialEncoder.java
@@ -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);