Shared Element Transitions not working for Android in Release build with Proguard enabled.
Description
On enabling proguard and creating release build
-keep class com.swmansion.reanimated.** { *; }
-keep class com.facebook.react.turbomodule.** { *; }
shared transitions stop working in the android release build.
In the minimal repo inside App.tsx I am calling ManyScreensExample to test the transition.
Steps to reproduce
In main branch run
npx react-native build-android --mode=release
https://github.com/software-mansion/react-native-reanimated/assets/11266456/96f1babe-c8e4-4bce-b439-36f2b3321dc4
If we create a build with proguard rules disabled, it works fine.
Snack or a link to a repository
https://github.com/jerinjohnk/reanimatedTest/tree/main
Reanimated version
3.1.0
React Native version
0.71.7
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Real device
Device model
Motorola g(40) fusion
Acknowledgements
Yes
I'm facing the same issue when proguard is enable. Any help guys? Thank you
In the official docs version 3.x there's no mention of usage of proguard rules.
I also want to know if the proguard from reanimated 2 still applies here.
facing the same issue when enabling proguard any update on this?
It works for me by adding this rule:
-keep class com.swmansion.** { *; }
I don't have much insight on what Java classes are necessary for this to work but it seems there are other classes involded here.