2019-12-02 14:41:23 +01:00
|
|
|
# Skyline Proguard Rules
|
2019-06-29 02:35:14 +02:00
|
|
|
# For more details, see
|
|
|
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
2020-09-19 16:45:17 +02:00
|
|
|
|
|
|
|
# Retain all classes within Skyline for traces + JNI access + Serializable classes
|
2020-10-03 12:24:20 +02:00
|
|
|
-keep class emu.skyline.** { *; }
|
2022-06-28 09:23:45 +02:00
|
|
|
# Keep kotlin classes so that kotlin reflection works
|
|
|
|
-keep class kotlin.** {*;}
|
2022-07-29 17:29:11 +02:00
|
|
|
|
|
|
|
# https://github.com/Kotlin/kotlinx.serialization#android
|
|
|
|
# Keep `Companion` object fields of serializable classes.
|
|
|
|
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
|
|
|
|
-if @kotlinx.serialization.Serializable class **
|
|
|
|
-keepclassmembers class <1> {
|
|
|
|
static <1>$Companion Companion;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Keep `serializer()` on companion objects (both default and named) of serializable classes.
|
|
|
|
-if @kotlinx.serialization.Serializable class ** {
|
|
|
|
static **$* *;
|
|
|
|
}
|
|
|
|
-keepclassmembers class <2>$<3> {
|
|
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
|
|
}
|
|
|
|
|
|
|
|
# Keep `INSTANCE.serializer()` of serializable objects.
|
|
|
|
-if @kotlinx.serialization.Serializable class ** {
|
|
|
|
public static ** INSTANCE;
|
|
|
|
}
|
|
|
|
-keepclassmembers class <1> {
|
|
|
|
public static <1> INSTANCE;
|
|
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
|
|
}
|
|
|
|
|
|
|
|
# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
|
|
|
|
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
|