diff --git a/WordPress/proguard.cfg b/WordPress/proguard.cfg index bcc4db81ae67..c408aff90ed8 100644 --- a/WordPress/proguard.cfg +++ b/WordPress/proguard.cfg @@ -65,6 +65,33 @@ -keep class org.wordpress.android.fluxc** { *; } ###### FluxC - end +###### Gson model classes - begin +# Kotlin data classes deserialized by Gson via reflection (Unsafe.allocateInstance). +# AGP 9's R8 full mode can class-merge or transform these into abstract types, +# causing InstantiationException / ClassCastException at runtime. + +# RecommendApiCallsProvider.RecommendTemplateData (Sentry 3GCQ, 3GDH) +-keep class org.wordpress.android.models.recommend.** { *; } + +# InviteLinksApiCallsProvider.InviteLinksItem +-keep class org.wordpress.android.ui.people.InviteLinksApiCallsProvider$InviteLinksItem { *; } + +# ReaderReadingPreferences and its nested Theme/FontFamily/FontSize enums +-keep class org.wordpress.android.ui.reader.models.ReaderReadingPreferences { *; } +-keep class org.wordpress.android.ui.reader.models.ReaderReadingPreferences$* { *; } + +# SubfilterListItemMapper.MappedSubfilterListItem (top-level private) +-keep class org.wordpress.android.ui.reader.subfilter.MappedSubfilterListItem { *; } + +# New stats card configurations and the *CardType enums referenced by their fields +-keep class org.wordpress.android.ui.newstats.StatsCardsConfiguration { *; } +-keep class org.wordpress.android.ui.newstats.StatsCardType { *; } +-keep class org.wordpress.android.ui.newstats.InsightsCardType { *; } +-keep class org.wordpress.android.ui.newstats.repository.InsightsCardsConfigurationRepository$PersistedConfig { *; } +-keep class org.wordpress.android.ui.newstats.subscribers.SubscribersCardsConfiguration { *; } +-keep class org.wordpress.android.ui.newstats.subscribers.SubscribersCardType { *; } +###### Gson model classes - end + ###### Dagger - begin -dontwarn com.google.errorprone.annotations.* ###### Dagger - end