-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add react-native-reanimated
library with version 2.17.0
#24
Conversation
react native reanimated
with version 2.17.0
react.native-reanimated
with version 2.17.0
react.native-reanimated
with version 2.17.0
react-native-reanimated
with version 2.17.0
react-native-reanimated
with version 2.17.0
react-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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.