# Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Keep classes used for serialization -keepattributes *Annotation*,EnclosingMethod,InnerClasses -keepattributes Signature -keepattributes SourceFile,LineNumberTable # Retrofit -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations -keepclassmembers,allowshrinking,allowobfuscation interface * { @retrofit2.http.* ; } -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement -dontwarn javax.annotation.** -dontwarn kotlin.Unit -dontwarn retrofit2.KotlinExtensions -dontwarn retrofit2.KotlinExtensions$* -if interface * { @retrofit2.http.* ; } -keep,allowobfuscation interface <1> -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation # OkHttp -dontwarn okhttp3.** -dontwarn okio.** -dontwarn javax.annotation.** -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase # Moshi -keep class com.squareup.moshi.** { *; } -keep interface com.squareup.moshi.** { *; } # Keep Moshi @JsonClass annotated classes and their generated adapters -keep @com.squareup.moshi.JsonClass class * { *; } -keep class **JsonAdapter { *; } -keep class **$JsonAdapter { *; } -keepnames @com.squareup.moshi.JsonClass class * # Keep Moshi-generated adapter factories -keep class *JsonAdapterFactory { *; } # Keep all DTOs with their fields and constructors -keep class com.shaarit.data.dto.** { (...); ; } -keepclassmembers class com.shaarit.data.dto.** { (...); ; } # Keep Kotlin data class component functions and copy methods -keepclassmembers class com.shaarit.data.dto.** { public ** component*(); public ** copy(...); } # Keep Kotlin Metadata -keep class kotlin.Metadata { *; } -keepattributes RuntimeVisibleAnnotations # Hilt / Dagger -keepclasseswithmembers class * { @dagger.* ; } -keepclasseswithmembers class * { @javax.inject.* ; @javax.inject.* ; } -keep class dagger.* { *; } -keep class javax.inject.* { *; } -keep class * extends dagger.hilt.android.internal.managers.ComponentSupplier { *; } -keep class * extends dagger.hilt.android.internal.managers.ViewComponentManager$FragmentContextWrapper { *; } -keep class * implements dagger.hilt.internal.GeneratedComponent { *; } -keep class * implements dagger.hilt.internal.GeneratedComponentManager { *; } -keep,allowobfuscation,allowshrinking @dagger.hilt.android.EarlyEntryPoint class * -keep,allowobfuscation,allowshrinking @dagger.hilt.android.EntryPoint class * -keep,allowobfuscation,allowshrinking @dagger.hilt.InstallIn class * -dontwarn dagger.internal.codegen.** # Hilt ViewModel -keep class * extends androidx.lifecycle.ViewModel { *; } -keep class * extends androidx.lifecycle.AndroidViewModel { *; } -keepclassmembers class * extends androidx.lifecycle.ViewModel { (...); } # JWT (io.jsonwebtoken) -keep class io.jsonwebtoken.** { *; } # Compose -keep class androidx.compose.** { *; } -dontwarn androidx.compose.** # Kotlin coroutines -keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {} -keepnames class kotlinx.coroutines.CoroutineExceptionHandler {} -keepclassmembernames class kotlinx.** { volatile ; } -dontwarn kotlinx.coroutines.** # Keep only what is strictly needed for serialization and Room -keep class com.shaarit.data.dto.** { *; } -keep class com.shaarit.data.local.entity.** { *; } -keep class com.shaarit.domain.model.** { *; } -keep class com.shaarit.data.export.Exported* { *; } # Keep Hilt generated classes -keep class com.shaarit.Hilt_* { *; } -keep class **_HiltModules_* { *; } -keep class **_Factory { *; } -keep class **_MembersInjector { *; }