I have managed to solve most of the litho related proguard issues. But this one I could not find a solution to.
Warning: com.facebook.litho.TransitionManager$AnimationState: can't find referenced class com.facebook.litho.TransitionManager$ChangeType
Warning: com.facebook.litho.TransitionManager$TransitionsAnimationBindingListener: can't find referenced class com.facebook.litho.TransitionManager$ChangeType
Warning: com.facebook.litho.widget.RecyclerBinder$AsyncInsertOperation: can't find referenced class com.facebook.litho.widget.RecyclerBinder$Operation
Warning: com.facebook.litho.widget.RecyclerBinder$AsyncMoveOperation: can't find referenced class com.facebook.litho.widget.RecyclerBinder$Operation
Warning: com.facebook.litho.widget.RecyclerBinder$AsyncRemoveOperation: can't find referenced class com.facebook.litho.widget.RecyclerBinder$Operation
Warning: com.facebook.litho.widget.RecyclerBinder$AsyncRemoveRangeOperation: can't find referenced class com.facebook.litho.widget.RecyclerBinder$Operation
Each one of these is due to internal interface ChangeType and Operation are IntDef interfaces in their respective classes.
Managed to build by adding following two lines in the proguard:
-dontwarn com.facebook.litho.TransitionManager$*
-dontwarn com.facebook.litho.widget.RecyclerBinder$*
The application was crashing runtime due to unavailability of yogaLayout after proguard.
So, keeping yoga specifically solved this issue as well.
-keep class com.facebook.yoga.** {*;}
Should these be added to some official proguard documentation?
Most helpful comment
Managed to build by adding following two lines in the proguard:
-dontwarn com.facebook.litho.TransitionManager$* -dontwarn com.facebook.litho.widget.RecyclerBinder$*The application was crashing runtime due to unavailability of yogaLayout after proguard.
So, keeping yoga specifically solved this issue as well.
-keep class com.facebook.yoga.** {*;}