File tree Expand file tree Collapse file tree
src/main/java/org/schabi/newpipe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,6 @@ ksp {
132132 arg(" room.schemaLocation" , " $projectDir /schemas" )
133133}
134134
135-
136135// Custom dependency configuration for ktlint
137136val ktlint by configurations.creating
138137
@@ -256,6 +255,7 @@ dependencies {
256255
257256 // HTTP client
258257 implementation(libs.squareup.okhttp)
258+ implementation(libs.squareup.okhttp.brotli)
259259
260260 // Media player
261261 implementation(libs.google.exoplayer.core)
Original file line number Diff line number Diff line change 2323import java .util .stream .Collectors ;
2424import java .util .stream .Stream ;
2525
26+ import okhttp3 .CompressionInterceptor ;
27+ import okhttp3 .Gzip ;
2628import okhttp3 .OkHttpClient ;
2729import okhttp3 .RequestBody ;
2830import okhttp3 .ResponseBody ;
31+ import okhttp3 .brotli .Brotli ;
2932
3033public final class DownloaderImpl extends Downloader {
3134 public static final String USER_AGENT =
@@ -44,6 +47,9 @@ private DownloaderImpl(final OkHttpClient.Builder builder) {
4447 .readTimeout (30 , TimeUnit .SECONDS )
4548// .cache(new Cache(new File(context.getExternalCacheDir(), "okhttp"),
4649// 16 * 1024 * 1024))
50+ .addInterceptor (new CompressionInterceptor (
51+ Brotli .INSTANCE ,
52+ Gzip .INSTANCE ))
4753 .build ();
4854 this .mCookies = new HashMap <>();
4955 }
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ squareup-leakcanary-core = { module = "com.squareup.leakcanary:leakcanary-androi
128128squareup-leakcanary-plumber = { module = " com.squareup.leakcanary:plumber-android" , version.ref = " leakcanary" }
129129squareup-leakcanary-watcher = { module = " com.squareup.leakcanary:leakcanary-object-watcher-android" , version.ref = " leakcanary" }
130130squareup-okhttp = { module = " com.squareup.okhttp3:okhttp" , version.ref = " okhttp" }
131+ squareup-okhttp-brotli = { module = " com.squareup.okhttp3:okhttp-brotli" , version.ref = " okhttp" }
131132zacsweers-autoservice-compiler = { module = " dev.zacsweers.autoservice:auto-service-ksp" , version.ref = " autoservice-zacsweers" }
132133
133134[plugins ]
You can’t perform that action at this time.
0 commit comments