
-keepclassmembers class * {
    @android.webkit.JavascriptInterface <methods>;
}
-keep class com.microsoft.dragoncopilot.turnkey.model.** { *; }
-keepattributes SourceFile,LineNumberTable

-keep @androidx.room.Entity class *
-dontwarn androidx.room.paging.**
-dontwarn com.google.j2objc.annotations.**
-dontwarn java.sql.JDBCType
-dontwarn javax.lang.model.**
-dontwarn javax.tools.**
-dontwarn java.lang.invoke.StringConcatFactory

-keep class * extends androidx.room.RoomDatabase {
    public <init>(...);
    public void createOpenDelegate();
    public androidx.sqlite.SQLiteConnection getOpenHelper();
    public void onValidateSchema(androidx.sqlite.SQLiteConnection);
}

-keepattributes *Annotation*

# Kotlin Serialization rules - Keep @SerialName annotations working in release builds
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

# Keep `Companion` object fields of serializable classes.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
    static <1>$Companion Companion;
}

# Keep `serializer()` on companion objects (both default and named)
-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 reflection
-keepattributes InnerClasses
-dontnote kotlinx.serialization.AnnotationsKt

# Keep serialization infrastructure
-keep class kotlinx.serialization.** { *; }
-dontwarn kotlinx.serialization.**
