# ProGuard rules for ShiftAlarm App

# 1. Android Entry Points (Names only)
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgent
-keep public class * extends android.preference.Preference

# 2. Room Database & Entities
-keep @androidx.room.Entity class * { *; }
-keep interface * extends androidx.room.RoomDatabase { *; }
-keep class * extends androidx.room.RoomDatabase { *; }
-keep @androidx.room.Dao interface * { *; }
-keep class * implements com.example.shiftalarm.ShiftDao { *; }

# 3. WorkManager
-keep class * extends androidx.work.ListenableWorker {
    <init>(android.content.Context, androidx.work.WorkerParameters);
}

# 4. ViewBinding / UI
-keep class * implements androidx.viewbinding.ViewBinding { *; }

# 5. Metadata for Stacktraces and Debugging
-keepattributes Signature, *Annotation*, EnclosingMethod, InnerClasses, SourceFile, LineNumberTable

# 6. JSON / Serialization (if any)
-keepclassmembers class * {
    @com.google.gson.annotations.SerializedName <fields>;
}

# 7. Kotlin Coroutines
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
-dontwarn kotlinx.coroutines.**

# 8. Suppress general warnings
-dontwarn javax.lang.model.element.Modifier
-dontwarn androidx.room.paging.**
