plaid icon indicating copy to clipboard operation
plaid copied to clipboard

Question: Dynamic Features & Data Binding & MinifyEnabled

Open erikjhordan-rey opened this issue 6 years ago • 2 comments

Hi! I noticed about the app crash in runtime related to shrinking enabled minifyEnabled true, Any update about this issue?

// There's a Dex Splitter issue when enabling DataBinding & proguard in dynamic features
 // The temporary workaround is to disable shrinking

https://github.com/android/plaid/blob/master/app/build.gradle#L57

erikjhordan-rey avatar Aug 28 '19 13:08 erikjhordan-rey

It seems as long as you don't obfuscaste the binding mapper, you can still have minifyEnabled true without the runtime crash.

-keep class com.example.module1.DataBinderMapperImpl { *; } 
-keep class com.example.module2.DataBinderMapperImpl { *; } 

https://stackoverflow.com/questions/54404492/proguard-with-appbundle-and-data-binding-illegalstateexception

rodrigojmlourenco avatar Sep 03 '19 13:09 rodrigojmlourenco

thanks, of course, I tried this solution and doesn't seem it works. (maybe I missing something)

erikjhordan-rey avatar Sep 03 '19 14:09 erikjhordan-rey