Add react-native-reanimated library with version 2.17.0#24
Conversation
react native reanimated with version 2.17.0react.native-reanimated with version 2.17.0
react.native-reanimated with version 2.17.0react-native-reanimated with version 2.17.0
react-native-reanimated with version 2.17.0react-native-reanimated library with version 2.17.0
51bb208 to
f492a13
Compare
|
@fluiddot I'd be happy to review this and the |
Sure, no problem @oguzkocer. In the meantime, I'm testing the new versions in Gutenberg Mobile using the binaries published in the Maven local folder. |
oguzkocer
left a comment
There was a problem hiding this comment.
@fluiddot This looks good to me as is - and this might be more of a personal taste - but I think adding the environment variables outside gradle command for the whole script might look cleaner.
This is how I would go about it:
# react-native-reanimated library uses JSC by default. These env vars will force it to use Hermes instead.
# https://github.com/software-mansion/react-native-reanimated/blob/dea5cc2c713724ee1705daea62d18733c4ce4127/android/build.gradle#L232-L252
export CLIENT_SIDE_BUILD="True"
export JS_RUNTIME="hermes"
This ^ would be added before the for loop and I'd remove the if check and simply do ./gradlew :$project:publishS3PublicationToS3Repository as we used to do.
Having said that, this is just a suggestion and please feel free to merge it as is if it's working as intended for you.
My original approach was actually using environment variables but I was hesitant to expose them for all modules, that's why I went with this approach. AFAIK, apart from Reanimated, no other module will use them when building so we could have them globally. I'm fine updating it using env vars 👍 . |
f492a13 to
d00056f
Compare
I applied the suggestion in d00056f. |
dcalhoun
left a comment
There was a problem hiding this comment.
These changes make sense to me. The testing instructions succeeded for me. Thank you for outlining the rationale for the changes. 🙇🏻
Thanks for the update @fluiddot, it looks great! |
Adds the Reanimated library. In newer versions, we no longer need the forked repository because we can now set the Hermes engine using an environment variable. Previously, we had to enforce this by updating the build configuration (reference).
NOTE: This version only works in newer versions of React Native, hence it was branched off from #23.
How to test
npm install.CLIENT_SIDE_BUILD="True" JS_RUNTIME="hermes" ./gradlew react-native-reanimated:publishToMavenLocal -exclude-task prepareToPublishToS3~/.m2/repository/org/wordpress-mobile/react-native-libraries.