From ccb727529dbec783a527c09a925d65e16e3d8307 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 13 Oct 2020 17:34:39 -0400 Subject: [PATCH] Add Proguard rules for kotlinx.serialization --- app/proguard-rules.pro | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 07ccd102e5..17c7045c4a 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -56,3 +56,24 @@ -keep class * implements com.google.gson.TypeAdapterFactory -keep class * implements com.google.gson.JsonSerializer -keep class * implements com.google.gson.JsonDeserializer + + +## kotlinx.serialization ## + +-keepattributes *Annotation*, InnerClasses +-dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations + +-keepclassmembers class kotlinx.serialization.json.** { + *** Companion; +} +-keepclasseswithmembers class kotlinx.serialization.json.** { + kotlinx.serialization.KSerializer serializer(...); +} + +-keep,includedescriptorclasses class eu.kanade.tachiyomi.**$$serializer { *; } +-keepclassmembers class eu.kanade.tachiyomi.** { + *** Companion; +} +-keepclasseswithmembers class eu.kanade.tachiyomi.** { + kotlinx.serialization.KSerializer serializer(...); +}