
* implement mihonapp/mihon#326 Archives are now being read from channels Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com> Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * disable parallelisms for loading into memory * switched to mutex * detekt changes * more detekt baseline changes --------- Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com> Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
299 lines
11 KiB
Prolog
299 lines
11 KiB
Prolog
-dontobfuscate
|
|
|
|
-keep,allowoptimization class eu.kanade.**
|
|
-keep,allowoptimization class tachiyomi.**
|
|
|
|
# Keep common dependencies used in extensions
|
|
-keep,allowoptimization class androidx.preference.** { public protected *; }
|
|
-keep,allowoptimization class kotlin.** { public protected *; }
|
|
-keep,allowoptimization class kotlinx.coroutines.** { public protected *; }
|
|
-keep,allowoptimization class kotlinx.serialization.** { public protected *; }
|
|
-keep,allowoptimization class kotlin.time.** { public protected *; }
|
|
-keep,allowoptimization class okhttp3.** { public protected *; }
|
|
-keep,allowoptimization class okio.** { public protected *; }
|
|
-keep,allowoptimization class org.jsoup.** { public protected *; }
|
|
-keep,allowoptimization class rx.** { public protected *; }
|
|
-keep,allowoptimization class app.cash.quickjs.** { public protected *; }
|
|
-keep,allowoptimization class uy.kohesive.injekt.** { public protected *; }
|
|
|
|
# From extensions-lib
|
|
-keep,allowoptimization class eu.kanade.tachiyomi.network.interceptor.RateLimitInterceptorKt { public protected *; }
|
|
-keep,allowoptimization class eu.kanade.tachiyomi.network.interceptor.SpecificHostRateLimitInterceptorKt { public protected *; }
|
|
-keep,allowoptimization class eu.kanade.tachiyomi.network.NetworkHelper { public protected *; }
|
|
-keep,allowoptimization class eu.kanade.tachiyomi.network.OkHttpExtensionsKt { public protected *; }
|
|
-keep,allowoptimization class eu.kanade.tachiyomi.network.RequestsKt { public protected *; }
|
|
-keep,allowoptimization class eu.kanade.tachiyomi.AppInfo { public protected *; }
|
|
|
|
# Debug functions
|
|
-keep,allowoptimization class exh.debug.DebugFunctions { public *; }
|
|
|
|
##---------------Begin: proguard configuration for RxJava 1.x ----------
|
|
-dontwarn sun.misc.**
|
|
|
|
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
|
|
long producerIndex;
|
|
long consumerIndex;
|
|
}
|
|
|
|
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
|
|
rx.internal.util.atomic.LinkedQueueNode producerNode;
|
|
}
|
|
|
|
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
|
|
rx.internal.util.atomic.LinkedQueueNode consumerNode;
|
|
}
|
|
|
|
-dontnote rx.internal.util.PlatformDependent
|
|
##---------------End: proguard configuration for RxJava 1.x ----------
|
|
|
|
##---------------Begin: proguard configuration for kotlinx.serialization ----------
|
|
-keepattributes *Annotation*, InnerClasses
|
|
-dontnote kotlinx.serialization.** # core serialization annotations
|
|
|
|
# kotlinx-serialization-json specific. Add this if you have java.lang.NoClassDefFoundError kotlinx.serialization.json.JsonObjectSerializer
|
|
-keepclassmembers class kotlinx.serialization.json.** {
|
|
*** Companion;
|
|
}
|
|
-keepclasseswithmembers class kotlinx.serialization.json.** {
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
|
|
-keep,includedescriptorclasses class eu.kanade.**$$serializer { *; }
|
|
-keepclassmembers class eu.kanade.** {
|
|
*** Companion;
|
|
}
|
|
-keepclasseswithmembers class eu.kanade.** {
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
|
|
-keep,includedescriptorclasses class tachiyomi.**$$serializer { *; }
|
|
-keepclassmembers class tachiyomi.** {
|
|
*** Companion;
|
|
}
|
|
-keepclasseswithmembers class tachiyomi.** {
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
|
|
-keep,includedescriptorclasses class exh.**$$serializer { *; }
|
|
-keepclassmembers class exh.** {
|
|
*** Companion;
|
|
}
|
|
-keepclasseswithmembers class exh.** {
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
|
|
# Filter serializer
|
|
-keep,includedescriptorclasses class xyz.nulldev.ts.api.http.serializer.**$$serializer { *; }
|
|
-keepclassmembers class xyz.nulldev.ts.api.http.serializer.** {
|
|
*** Companion;
|
|
}
|
|
-keepclasseswithmembers class xyz.nulldev.ts.api.http.serializer.** {
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
|
|
-keep class kotlinx.serialization.**
|
|
-keepclassmembers class kotlinx.serialization.** {
|
|
<methods>;
|
|
}
|
|
##---------------End: proguard configuration for kotlinx.serialization ----------
|
|
|
|
# === Reactive network: https://github.com/pwittchen/ReactiveNetwork/tree/v0.12.4#proguard-configuration
|
|
-dontwarn com.github.pwittchen.reactivenetwork.library.rx2.ReactiveNetwork
|
|
-dontwarn io.reactivex.functions.Function
|
|
-dontwarn rx.internal.util.**
|
|
-dontwarn sun.misc.Unsafe
|
|
|
|
# === Okhttp: https://github.com/square/okhttp/blob/3637fc56f70f87da696847defd311dbfb28e87b5/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro
|
|
# JSR 305 annotations are for embedding nullability information.
|
|
-dontwarn javax.annotation.**
|
|
# A resource is loaded with a relative path so the package of this class must be preserved.
|
|
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
|
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
|
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
|
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
|
|
-dontwarn okhttp3.internal.platform.ConscryptPlatform
|
|
|
|
# === Okio: https://github.com/square/okio/tree/9b8545e7fa267c9d89753283990f24a35cd69cd6#proguard
|
|
-dontwarn okio.**
|
|
|
|
# === Keep RxAndroid, https://github.com/ReactiveX/RxAndroid/issues/350
|
|
-keep class rx.android.** { *; }
|
|
|
|
# XmlUtil
|
|
-keep public enum nl.adaptivity.xmlutil.EventType { *; }
|
|
|
|
# Apache Commons Compress
|
|
-keep class * extends org.apache.commons.compress.archivers.zip.ZipExtraField { <init>(); }
|
|
|
|
# Firebase
|
|
-keep class com.google.firebase.installations.** { *; }
|
|
-keep interface com.google.firebase.installations.** { *; }
|
|
|
|
# Google Drive
|
|
-keep class com.google.api.services.** { *; }
|
|
|
|
# Google OAuth
|
|
-keep class com.google.api.client.** { *; }
|
|
|
|
# SY -->
|
|
# SqlCipher
|
|
-keepclassmembers class net.zetetic.database.sqlcipher.SQLiteCustomFunction { *; }
|
|
-keepclassmembers class net.zetetic.database.sqlcipher.SQLiteConnection { *; }
|
|
-keepclassmembers class net.zetetic.database.sqlcipher.SQLiteGlobal { *; }
|
|
-keepclassmembers class net.zetetic.database.sqlcipher.SQLiteDebug { *; }
|
|
-keepclassmembers class net.zetetic.database.sqlcipher.SQLiteDebug$* { *; }
|
|
# SY <--
|
|
|
|
# Design library
|
|
-dontwarn com.google.android.material.**
|
|
-keep class com.google.android.material.** { *; }
|
|
-keep interface com.google.android.material.** { *; }
|
|
-keep public class com.google.android.material.R$* { *; }
|
|
|
|
-keep class com.hippo.image.** { *; }
|
|
-keep interface com.hippo.image.** { *; }
|
|
|
|
# === Injekt
|
|
## From original config: "Attempt to fix: java.lang.NoClassDefFoundError: uy.kohesive.injekt.registry.default.DefaultRegistrar$NOKEY$1"
|
|
-keep class uy.kohesive.injekt.** { *; }
|
|
|
|
# === RxBinding
|
|
-dontwarn com.google.auto.value.AutoValue
|
|
|
|
# === Crashlytics
|
|
-keepattributes *Annotation*
|
|
-keepattributes SourceFile,LineNumberTable
|
|
-keep class com.crashlytics.** { *; }
|
|
-dontwarn com.crashlytics.**
|
|
|
|
# === Humanize + Guava: https://github.com/google/guava/wiki/UsingProGuardWithGuava
|
|
-dontwarn javax.lang.model.element.Modifier
|
|
-keep class org.ocpsoft.prettytime.i18n.**
|
|
|
|
# Note: We intentionally don't add the flags we'd need to make Enums work.
|
|
# That's because the Proguard configuration required to make it work on
|
|
# optimized code would preclude lots of optimization, like converting enums
|
|
# into ints.
|
|
|
|
# Throwables uses internal APIs for lazy stack trace resolution
|
|
-dontnote sun.misc.SharedSecrets
|
|
-keep class sun.misc.SharedSecrets {
|
|
*** getJavaLangAccess(...);
|
|
}
|
|
-dontnote sun.misc.JavaLangAccess
|
|
-keep class sun.misc.JavaLangAccess {
|
|
*** getStackTraceElement(...);
|
|
*** getStackTraceDepth(...);
|
|
}
|
|
|
|
# FinalizableReferenceQueue calls this reflectively
|
|
# Proguard is intelligent enough to spot the use of reflection onto this, so we
|
|
# only need to keep the names, and allow it to be stripped out if
|
|
# FinalizableReferenceQueue is unused.
|
|
-keepnames class com.google.common.base.internal.Finalizer {
|
|
*** startFinalizer(...);
|
|
}
|
|
# However, it cannot "spot" that this method needs to be kept IF the class is.
|
|
-keepclassmembers class com.google.common.base.internal.Finalizer {
|
|
*** startFinalizer(...);
|
|
}
|
|
-keepnames class com.google.common.base.FinalizableReference {
|
|
void finalizeReferent();
|
|
}
|
|
-keepclassmembers class com.google.common.base.FinalizableReference {
|
|
void finalizeReferent();
|
|
}
|
|
|
|
# Striped64, LittleEndianByteArray, UnsignedBytes, AbstractFuture
|
|
-dontwarn sun.misc.Unsafe
|
|
|
|
# Striped64 appears to make some assumptions about object layout that
|
|
# really might not be safe. This should be investigated.
|
|
-keepclassmembers class com.google.common.cache.Striped64 {
|
|
*** base;
|
|
*** busy;
|
|
}
|
|
-keepclassmembers class com.google.common.cache.Striped64$Cell {
|
|
<fields>;
|
|
}
|
|
|
|
-dontwarn java.lang.SafeVarargs
|
|
|
|
-keep class java.lang.Throwable {
|
|
*** addSuppressed(...);
|
|
}
|
|
|
|
# Futures.getChecked, in both of its variants, is incompatible with proguard.
|
|
|
|
# Used by AtomicReferenceFieldUpdater and sun.misc.Unsafe
|
|
-keepclassmembers class com.google.common.util.concurrent.AbstractFuture** {
|
|
*** waiters;
|
|
*** value;
|
|
*** listeners;
|
|
*** thread;
|
|
*** next;
|
|
}
|
|
-keepclassmembers class com.google.common.util.concurrent.AtomicDouble {
|
|
*** value;
|
|
}
|
|
-keepclassmembers class com.google.common.util.concurrent.AggregateFutureState {
|
|
*** remaining;
|
|
*** seenExceptions;
|
|
}
|
|
|
|
# Since Unsafe is using the field offsets of these inner classes, we don't want
|
|
# to have class merging or similar tricks applied to these classes and their
|
|
# fields. It's safe to allow obfuscation, since the by-name references are
|
|
# already preserved in the -keep statement above.
|
|
-keep,allowshrinking,allowobfuscation class com.google.common.util.concurrent.AbstractFuture** {
|
|
<fields>;
|
|
}
|
|
|
|
# Futures.getChecked (which often won't work with Proguard anyway) uses this. It
|
|
# has a fallback, but again, don't use Futures.getChecked on Android regardless.
|
|
-dontwarn java.lang.ClassValue
|
|
|
|
# MoreExecutors references AppEngine
|
|
-dontnote com.google.appengine.api.ThreadManager
|
|
-keep class com.google.appengine.api.ThreadManager {
|
|
static *** currentRequestThreadFactory(...);
|
|
}
|
|
-dontnote com.google.apphosting.api.ApiProxy
|
|
-keep class com.google.apphosting.api.ApiProxy {
|
|
static *** getCurrentEnvironment (...);
|
|
}
|
|
|
|
# R8 full mode
|
|
-keepattributes Signature
|
|
-keep,allowoptimization class kotlin.coroutines.Continuation
|
|
-keep,allowoptimization class * extends uy.kohesive.injekt.api.TypeReference
|
|
-keep,allowoptimization public class io.requery.android.database.sqlite.SQLiteConnection { *; }
|
|
|
|
# Keep apache http client
|
|
-keep class org.apache.http.** { *; }
|
|
|
|
# Suggested rules
|
|
-dontwarn com.oracle.svm.core.annotate.AutomaticFeature
|
|
-dontwarn com.oracle.svm.core.annotate.Delete
|
|
-dontwarn com.oracle.svm.core.annotate.Substitute
|
|
-dontwarn com.oracle.svm.core.annotate.TargetClass
|
|
-dontwarn com.oracle.svm.core.configure.ResourcesRegistry
|
|
-dontwarn org.graalvm.nativeimage.ImageSingletons
|
|
-dontwarn org.graalvm.nativeimage.hosted.Feature$BeforeAnalysisAccess
|
|
-dontwarn org.graalvm.nativeimage.hosted.Feature
|
|
-dontwarn org.slf4j.impl.StaticLoggerBinder
|
|
-dontwarn java.lang.Module
|
|
-dontwarn org.graalvm.nativeimage.hosted.RuntimeResourceAccess
|
|
-dontwarn org.jspecify.annotations.NullMarked
|
|
-dontwarn javax.naming.InvalidNameException
|
|
-dontwarn javax.naming.NamingException
|
|
-dontwarn javax.naming.directory.Attribute
|
|
-dontwarn javax.naming.directory.Attributes
|
|
-dontwarn javax.naming.ldap.LdapName
|
|
-dontwarn javax.naming.ldap.Rdn
|
|
-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 |