Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions lib/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# BindingExtension discovers the binding class at runtime by walking
# generic supertype signatures (findClass in Utils.kt) and then invoking
# the binding's static inflate(...) reflectively. R8 strips the Signature
# attribute and inflate methods by default, which crashes every
# BindingActivity/BindingFragment in minified builds (see issue #11).

-keepattributes Signature

-keep class com.jintin.bindingextension.** { *; }

# Keep subclasses (and their generic signatures) so the supertype walk
# still finds the parameterized BindingActivity/BindingFragment.
-keep class * extends com.jintin.bindingextension.BindingActivity
-keep class * extends com.jintin.bindingextension.BindingFragment

-keepclassmembers class * implements androidx.viewbinding.ViewBinding {
public static ** inflate(...);
public static ** bind(android.view.View);
}