File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 15
15
public static *** initialState(...);
16
16
}
17
17
18
+ # If a companion object of a class is implementing com.airbnb.mvrx.MavericksViewModelFactory it is used to
19
+ # instatiate ViewModels.
20
+ # This is done by looking up classes defined as subclasses of the ViewModel class itself that implement
21
+ # com.airbnb.mvrx.MavericksViewModelFactory and thus we need to ensure that the companion objects definition
22
+ # stays within the ViewModel class during Proguard/Dexguard/R8 optimization. Which was not the case anymore with
23
+ # R8 3.3.x with enabeld full mode
24
+ # We can however rename or even shrink away the ViewModel/Companion class if they are not used.
25
+ # This ensures we keep the companion objectet implementing that interface
26
+ -keep,allowshrinking,allowobfuscation class **$Companion implements com.airbnb.mvrx.MavericksViewModelFactory
27
+ # This ensures we keep the class that conmtains the Companion object we kept one line up.
28
+ -if class **$Companion implements com.airbnb.mvrx.MavericksViewModelFactory
29
+ -keep,allowshrinking,allowobfuscation class <1>
30
+
18
31
# If a MvRxViewModelFactory is used without JvmStatic, keep create and initalState methods which
19
32
# are accessed via reflection.
20
33
-keepclassmembers class ** implements com.airbnb.mvrx.MavericksViewModelFactory {
You can’t perform that action at this time.
0 commit comments