-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 support for React Native 0.71 #3745
Conversation
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.
Let me know if you need further inputs on 0.71 support for Reanimated
## Description This PR aligns Example app with RN 0.70.5 app template in order to simplify the process of adoption of RN 0.71.0 (#3745). Even though Example never runs with Fabric enabled (it's Paper-only), I decided to leave new-arch Java and C++ files which will be deleted in 0.71.0-rc.0 for the sake of completeness. Example app has a few dependencies, e.g. SVG, PagerView or MaskedView - as of this PR they are autolinked instead of being linked manually in `settings.gradle`. I also removed some files specific for tvOS since we already have a separate app called TVOSExample. ### TODO: - [x] remove `react-native-gradle-plugin` from Example/package.json - [x] check Android / iOS - [ ] check debug / release - [x] check debugging worklets (Flipper needs to be launched before the app) - [x] check if `MaskedView` component works
This PR aligns Example app with RN 0.70.5 app template in order to simplify the process of adoption of RN 0.71.0 (#3745). Even though Example never runs with Fabric enabled (it's Paper-only), I decided to leave new-arch Java and C++ files which will be deleted in 0.71.0-rc.0 for the sake of completeness. Example app has a few dependencies, e.g. SVG, PagerView or MaskedView - as of this PR they are autolinked instead of being linked manually in `settings.gradle`. I also removed some files specific for tvOS since we already have a separate app called TVOSExample. - [x] remove `react-native-gradle-plugin` from Example/package.json - [x] check Android / iOS - [ ] check debug / release - [x] check debugging worklets (Flipper needs to be launched before the app) - [x] check if `MaskedView` component works
…atedUIImplementation`
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.
## Summary This PR fixes a warning that `debugToken_` field is unused in release mode after #3745 which gets escalated to a compile error thanks to `-Werror`. ## Test plan Check if Example app compiles in release mode.
Will this be backported to 2.X or do I have to use version 3 for RN 0.71? |
## Description It seems that autolinking got complete overhaul in 0.71.0 as `android/app/src/main/jni` directory was deleted -> thus it works differently for sure now. Still need to dive into it. **FabricTestExample** * [x] Android * [x] iOS **TestsExample** * #1679 **FabricExample** * #1680 **TODO**: Consider whether to use `com.facebook.react:react-native:+` or `com.facebook.react:react-native` (without `+`) in `android/build.gradle` of the library. AFAIK the former takes highest available version from defined repositories (should be `node_modules`?), the latter uses version injected by React Native Gradle Plugin (but I believe it works since React Native 0.71.0 or 0.70.0 (need to check) -- so version check might be necessary). Decided to leave: ```gradle implementation 'com.facebook.react:react-native:+' ``` in library's `android/build.gradle` due to following reasons: * [Android's readme in RN repo](https://github.com/facebook/react-native/blob/e108e9ebf1e6c52b6eeffeb6c41f842ad95baa0d/android/README.md) * [Road to 0.71.0 post](reactwg/react-native-releases#41 (reply in thread)) Blocked by: * ~facebook/react-native#35306 * ~software-mansion/react-native-reanimated#3745 * ~software-mansion/react-native-gesture-handler#2313 (decided to fix version on commit) * ~`react-native-safe-area-context` - lacks support for RN71~ (created patch) * ~`@react-native-community/cli-platform-android` requires this patch: kkafar/RNS-tester@9edaaa9. The patch is already merged, but it is not shipped with `react-native` yet.~ **NOTE**: Example application will handled in separate PR, as there are problems with detox (it does not support 0.71 yet) and we run CI on that app. ## Changes * Updated examples * Updated library's build code ## Test code and steps to reproduce Run example applications ## Checklist - [ ] Ensured that CI passes
## Description This PR aligns Example app with RN 0.70.5 app template in order to simplify the process of adoption of RN 0.71.0 (software-mansion#3745). Even though Example never runs with Fabric enabled (it's Paper-only), I decided to leave new-arch Java and C++ files which will be deleted in 0.71.0-rc.0 for the sake of completeness. Example app has a few dependencies, e.g. SVG, PagerView or MaskedView - as of this PR they are autolinked instead of being linked manually in `settings.gradle`. I also removed some files specific for tvOS since we already have a separate app called TVOSExample. ### TODO: - [x] remove `react-native-gradle-plugin` from Example/package.json - [x] check Android / iOS - [ ] check debug / release - [x] check debugging worklets (Flipper needs to be launched before the app) - [x] check if `MaskedView` component works
## Description Closes software-mansion#3871. ### TODO - [x] Update Example app template to 0.71.0-rc.5 - [x] Update FabricExample app template to 0.71.0-rc.5 - [x] Consume shared libraries and headers from prefabs (partially done) - [x] Use `implementation "com.facebook.react:react-native` (without plus) for RN 0.71+ - [x] Use `implementation "com.facebook.react:react-native:+" // From node_modules` for older RN versions (leave as it it now) - [x] Make it work with Hermes - [x] Make it works with JSC - [x] Properly detect Hermes on Android - [x] Include `folly-flags.cmake` directly - [x] Use headers from path instead of prefabs - [x] Depend on `jscexecutor` and `hermes-executor` - [x] Fix Layout Animations on Paper due after removal of deprecated `UIImplementation` (facebook/react-native@e7d7563) - [x] Use TypeScript types directly from package - [x] Add #ifdefs for backward-incompatible code changes (e.g. `debugToken_`) - [x] Use different sourcesets for `UIImplementationProvider` - [x] Add missing `SystraceSection` in `UIManager_cloneNode` - [x] Confirm that `UIManager_cloneNode` and `UIManagerBinding` are identical to those in react-native - [x] Remove react-native.config.js - [x] Update metro-inspector-proxy patch ### Won't do - [ ] Declare dependency on `React-jsi` & `React-jsc` based on `ENV['USE_HERMES']` in RNReanimated.podspec - not necessary - [ ] Fix Jest `testEnvironment`, use `react-native-env.js` - still doesn't work - [ ] Do we still need `kotlinVersion` in build.gradle? - probably yes - [ ] Restore MBFingerTip in ReanimatedExample ### Checklist - [ ] Check compatibility with older RN versions - [ ] Check if debugging worklets with Flipper works - [ ] Check if debugging in Android Studio works
## Summary This PR fixes a warning that `debugToken_` field is unused in release mode after software-mansion#3745 which gets escalated to a compile error thanks to `-Werror`. ## Test plan Check if Example app compiles in release mode.
## Description It seems that autolinking got complete overhaul in 0.71.0 as `android/app/src/main/jni` directory was deleted -> thus it works differently for sure now. Still need to dive into it. **FabricTestExample** * [x] Android * [x] iOS **TestsExample** * software-mansion/react-native-screens#1679 **FabricExample** * software-mansion/react-native-screens#1680 **TODO**: Consider whether to use `com.facebook.react:react-native:+` or `com.facebook.react:react-native` (without `+`) in `android/build.gradle` of the library. AFAIK the former takes highest available version from defined repositories (should be `node_modules`?), the latter uses version injected by React Native Gradle Plugin (but I believe it works since React Native 0.71.0 or 0.70.0 (need to check) -- so version check might be necessary). Decided to leave: ```gradle implementation 'com.facebook.react:react-native:+' ``` in library's `android/build.gradle` due to following reasons: * [Android's readme in RN repo](https://github.com/facebook/react-native/blob/e108e9ebf1e6c52b6eeffeb6c41f842ad95baa0d/android/README.md) * [Road to 0.71.0 post](reactwg/react-native-releases#41 (reply in thread)) Blocked by: * ~facebook/react-native#35306 * ~software-mansion/react-native-reanimated#3745 * ~software-mansion/react-native-gesture-handler#2313 (decided to fix version on commit) * ~`react-native-safe-area-context` - lacks support for RN71~ (created patch) * ~`@react-native-community/cli-platform-android` requires this patch: kkafar/RNS-tester@9edaaa9. The patch is already merged, but it is not shipped with `react-native` yet.~ **NOTE**: Example application will handled in separate PR, as there are problems with detox (it does not support 0.71 yet) and we run CI on that app. ## Changes * Updated examples * Updated library's build code ## Test code and steps to reproduce Run example applications ## Checklist - [ ] Ensured that CI passes
how to implement react native reanimated to nx monorepo project with react webpack? please |
Description
Closes #3871.
TODO
implementation "com.facebook.react:react-native
(without plus) for RN 0.71+implementation "com.facebook.react:react-native:+" // From node_modules
for older RN versions (leave as it it now)folly-flags.cmake
directlyjscexecutor
andhermes-executor
UIImplementation
(facebook/react-native@e7d7563)debugToken_
)UIImplementationProvider
SystraceSection
inUIManager_cloneNode
UIManager_cloneNode
andUIManagerBinding
are identical to those in react-nativeWon't do
React-jsi
&React-jsc
based onENV['USE_HERMES']
in RNReanimated.podspec - not necessarytestEnvironment
, usereact-native-env.js
- still doesn't workkotlinVersion
in build.gradle? - probably yesChecklist