diff --git a/financial-connections-example/gradle.properties b/financial-connections-example/gradle.properties index 893a498b7b3..9dacf05fbf8 100644 --- a/financial-connections-example/gradle.properties +++ b/financial-connections-example/gradle.properties @@ -1 +1 @@ -STRIPE_ANDROID_NAMESPACE=com.stripe.android.financialconnections.example \ No newline at end of file +STRIPE_ANDROID_NAMESPACE=com.stripe.android.financialconnections.example diff --git a/financial-connections/consumer-rules.txt b/financial-connections/consumer-rules.txt index 8ed3674db95..4594ecbbcfa 100644 --- a/financial-connections/consumer-rules.txt +++ b/financial-connections/consumer-rules.txt @@ -13,3 +13,25 @@ -keep,allowobfuscation class ** implements com.airbnb.mvrx.MavericksViewModelFactory -dontwarn com.google.crypto.tink.subtle.XChaCha20Poly1305 + + +# MavericksViewModel loads the Companion class via reflection and thus we need to make sure we keep +# the name of the Companion object. +-keepclassmembers class ** extends com.airbnb.mvrx.MavericksViewModel { + ** Companion; +} + +# Members of the Kotlin data classes used as the state in Mavericks are read via Kotlin reflection which cause trouble +# with Proguard if they are not kept. +# During reflection cache warming also the types are accessed via reflection. Need to keep them too. +-keepclassmembers,includedescriptorclasses,allowobfuscation class ** implements com.airbnb.mvrx.MavericksState { + *; +} + +# The MavericksState object and the names classes that implement the MavericksState interface need to be +# kept as they are accessed via reflection. +-keepnames class com.airbnb.mvrx.MavericksState +-keepnames class * implements com.airbnb.mvrx.MavericksState + +# MavericksViewModelFactory is referenced via reflection using the Companion class name. +-keepnames class * implements com.airbnb.mvrx.MavericksViewModelFactory