Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

95 lines
3.7 KiB
Prolog

# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-renamesourcefileattribute
-repackageclasses
-allowaccessmodification
# from: https://www.guardsquare.com/blog/eliminating-data-leaks-caused-by-kotlin-assertions
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static void checkNotNull(...);
public static void checkExpressionValueIsNotNull(...);
public static void checkNotNullExpressionValue(...);
public static void checkParameterIsNotNull(...);
public static void checkNotNullParameter(...);
public static void checkReturnedValueIsNotNull(...);
public static void checkFieldIsNotNull(...);
public static void throwUninitializedPropertyAccessException(...);
public static void throwNpe(...);
public static void throwJavaNpe(...);
public static void throwAssert(...);
public static void throwIllegalArgument(...);
public static void throwIllegalState(...);
}
-dontwarn kotlin.**
# moshix issues with serialized sealed classes
-keep class bruhcollective.itaysonlab.jetispot.core.objs.** { *; }
# genericjson gson fixes
-keep,allowobfuscation class * extends xyz.gianlu.librespot.json.JsonWrapper { *; }
# protobuf
-keep class com.spotify.** {*;}
-keep class spotify.** {*;}
-keep class bruhcollective.itaysonlab.swedentricks.** {*;}
-keep class bruhcollective.itaysonlab.jetispot.proto.** {*;}
-keep class com.google.protobuf.Any {*;}
-keep class * extends com.google.protobuf.AbstractMessage {*;}
# librespot
-keep class xyz.gianlu.librespot.** { *; }
-keep class xyz.gianlu.librespot.audio.decoders.** {*;}
-keep class bruhcollective.itaysonlab.jetispot.playback.sp.AndroidSinkOutput { *; }
-keep class bruhcollective.itaysonlab.jetispot.playback.sp.AndroidNativeDecoder { *; }
# gson rules
-keepattributes Signature
-keepattributes *Annotation*
-dontwarn sun.misc.**
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
# retrofit
-keepattributes Signature, InnerClasses, EnclosingMethod
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
-keepattributes AnnotationDefault
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn javax.annotation.**
-dontwarn kotlin.Unit
-dontwarn retrofit2.KotlinExtensions
-dontwarn retrofit2.KotlinExtensions$*
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation