ProGuard with AppBundle and data-binding: IllegalStateException
Only need to add this to your proguard-rules.pro
, where module1 and module2 are Dynamic Feature Modules with databinding enabled.
-keep class com.example.module1.DataBinderMapperImpl { *; }
-keep class com.example.module2.DataBinderMapperImpl { *; }
I don't really know why but for me, the following combination worked:
-dontwarn androidx.databinding.**
-keep class androidx.databinding.** { *; }
-keep class * extends androidx.databinding.DataBinderMapper
I tried using just -keep class * extends androidx.databinding.DataBinderMapper
but it didn't work.
Also I tried using
-dontwarn androidx.databinding.**
-keep class androidx.databinding.** { *; }
but that didn't work either.
What worked was a combination of the three.