-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: migrate to turbomodule #5751
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d7b43cf
feat: migrate to turbomodule
WoLewicki 7104006
fix: use strict
WoLewicki 36cd491
Fix warning from NativeEventEmitter constructor
tomekzaw 447da72
Merge branch 'main' into @wolewicki/migrate-to-turbomodule
WoLewicki 38ed8ff
fix: review suggestions
WoLewicki a4f4426
fix: try to handle web
WoLewicki 66d8147
fix: use strict
WoLewicki f5076b4
fix: proper export
WoLewicki a62f415
Update comment in generated spec file
tomekzaw 4dc8f1c
Add newline in REAModule.h
tomekzaw f47ae87
Restore #endif comment
tomekzaw e47db97
Revert fabricUtils
tomekzaw 03170d1
Merge branch 'main' into @wolewicki/migrate-to-turbomodule
tomekzaw ad18b16
Rename `JSPropsUpdater.ts` to `JSPropsUpdater.native.ts`
tomekzaw 8fd99a5
Add `JSPropsUpdater.ts`
tomekzaw 1e0fa45
Update Podfile.lock
tomekzaw 506de61
Rename files
tomekzaw 1954ac5
Merge branch 'main' into @wolewicki/migrate-to-turbomodule
WoLewicki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
android/src/paper/java/com/swmansion/reanimated/NativeReanimatedModuleSpec.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /** | ||
| * This code was copied from android/build/generated/source/codegen/java/com/swmansion/reanimated/NativeReanimatedModuleSpec.java | ||
| * which was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | ||
| * | ||
| * Do not edit this file as changes may cause incorrect behavior and will be lost | ||
| * once the code is regenerated. | ||
| * | ||
| * @generated by codegen project: GenerateModuleJavaSpec.js | ||
| * | ||
| * @nolint | ||
| */ | ||
|
|
||
| package com.swmansion.reanimated; | ||
|
|
||
| import com.facebook.proguard.annotations.DoNotStrip; | ||
| import com.facebook.react.bridge.ReactApplicationContext; | ||
| import com.facebook.react.bridge.ReactContextBaseJavaModule; | ||
| import com.facebook.react.bridge.ReactMethod; | ||
| import com.facebook.react.turbomodule.core.interfaces.TurboModule; | ||
| import javax.annotation.Nonnull; | ||
|
|
||
| public abstract class NativeReanimatedModuleSpec extends ReactContextBaseJavaModule implements TurboModule { | ||
| public static final String NAME = "ReanimatedModule"; | ||
|
|
||
| public NativeReanimatedModuleSpec(ReactApplicationContext reactContext) { | ||
| super(reactContext); | ||
| } | ||
|
|
||
| @Override | ||
| public @Nonnull String getName() { | ||
| return NAME; | ||
| } | ||
|
|
||
| @ReactMethod(isBlockingSynchronousMethod = true) | ||
| @DoNotStrip | ||
| public abstract boolean installTurboModule(String valueUnpackerCode); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,31 @@ | ||
| #ifdef RCT_NEW_ARCH_ENABLED | ||
| #import <rnreanimated/rnreanimated.h> | ||
| #else | ||
| #import <React/RCTBridgeModule.h> | ||
| #endif // RCT_NEW_ARCH_ENABLED | ||
|
|
||
| #import <RNReanimated/REAAnimationsManager.h> | ||
| #import <RNReanimated/REANodesManager.h> | ||
| #import <React/RCTEventDispatcher.h> | ||
| #import <React/RCTEventEmitter.h> | ||
| #import <React/RCTUIManager.h> | ||
| #import <React/RCTUIManagerObserverCoordinator.h> | ||
| #import <React/RCTUIManagerUtils.h> | ||
|
|
||
| #import <RNReanimated/REAAnimationsManager.h> | ||
| #import <RNReanimated/REANodesManager.h> | ||
|
|
||
| @interface REAModule : RCTEventEmitter <RCTBridgeModule, RCTEventDispatcherObserver, RCTUIManagerObserver> | ||
| @interface REAModule : RCTEventEmitter | ||
| #ifdef RCT_NEW_ARCH_ENABLED | ||
| <NativeReanimatedModuleSpec, | ||
| #else | ||
| <RCTBridgeModule, | ||
| #endif // RCT_NEW_ARCH_ENABLED | ||
| RCTEventDispatcherObserver, | ||
| RCTUIManagerObserver> | ||
|
|
||
| @property (nonatomic, readonly) REANodesManager *nodesManager; | ||
| @property REAAnimationsManager *animationsManager; | ||
|
|
||
| #ifdef RCT_NEW_ARCH_ENABLED | ||
| - (void)installReanimatedAfterReload; | ||
| #endif | ||
| #endif // RCT_NEW_ARCH_ENABLED | ||
|
|
||
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.