2019-12-02 16:41:23 +03:00
|
|
|
# Skyline Proguard Rules
|
2019-06-29 03:35:14 +03:00
|
|
|
# For more details, see
|
|
|
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
2020-09-19 17:45:17 +03:00
|
|
|
|
|
|
|
# Retain all classes within Skyline for traces + JNI access + Serializable classes
|
2020-10-03 13:24:20 +03:00
|
|
|
-keep class emu.skyline.** { *; }
|
2022-06-28 10:23:45 +03:00
|
|
|
# Keep kotlin classes so that kotlin reflection works
|
|
|
|
-keep class kotlin.** {*;}
|
2022-07-29 18:29:11 +03: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
|