react-native-reanimated 2.8.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp +4 -4
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +38 -0
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +23 -0
- package/Common/cpp/Tools/RuntimeDecorator.cpp +17 -11
- package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +8 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +8 -0
- package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +5 -0
- package/RNReanimated.podspec +22 -3
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/CMakeLists.txt +216 -84
- package/android/build.gradle +255 -229
- package/android/react-native-reanimated-66-hermes.aar +0 -0
- package/android/react-native-reanimated-66-jsc.aar +0 -0
- package/android/react-native-reanimated-67-hermes.aar +0 -0
- package/android/react-native-reanimated-67-jsc.aar +0 -0
- package/android/react-native-reanimated-68-hermes.aar +0 -0
- package/android/react-native-reanimated-68-jsc.aar +0 -0
- package/android/react-native-reanimated-69-hermes.aar +0 -0
- package/android/react-native-reanimated-69-jsc.aar +0 -0
- package/android/react-native-reanimated-70-hermes.aar +0 -0
- package/android/react-native-reanimated-70-jsc.aar +0 -0
- package/{lib/types/lib/reanimated2/platform-specific/RNRenderer.web.d.ts → android/rnVersionPatch/69/.gitkeep} +0 -0
- package/android/rnVersionPatch/70/.gitkeep +0 -0
- package/android/src/main/cpp/NativeProxy.cpp +56 -11
- package/android/src/main/cpp/OnLoad.cpp +1 -0
- package/android/src/main/cpp/headers/NativeProxy.h +29 -0
- package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +25 -0
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +3 -1
- package/android/src/main/java/com/swmansion/reanimated/keyboardObserver/ReanimatedKeyboardEventListener.java +165 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +19 -16
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +5 -1
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorListener.java +24 -1
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorType.java +7 -5
- package/ios/REANodesManager.m +31 -8
- package/ios/keyboardObserver/REAKeyboardEventObserver.h +17 -0
- package/ios/keyboardObserver/REAKeyboardEventObserver.m +198 -0
- package/ios/native/NativeProxy.mm +20 -1
- package/ios/native/REAInitializer.mm +10 -4
- package/ios/sensor/ReanimatedSensor.m +27 -18
- package/lib/Animated.js +8 -21
- package/lib/index.js +12 -20
- package/lib/index.web.js +4 -0
- package/lib/reanimated2/Colors.js +1 -1
- package/lib/reanimated2/NativeMethods.js +3 -0
- package/lib/reanimated2/NativeReanimated/NativeReanimated.js +7 -1
- package/lib/reanimated2/animation/sequence.js +0 -3
- package/lib/reanimated2/animation/util.js +4 -1
- package/lib/reanimated2/commonTypes.js +8 -1
- package/lib/reanimated2/component/FlatList.js +8 -8
- package/lib/reanimated2/component/Image.js +4 -0
- package/lib/reanimated2/component/ScrollView.js +4 -0
- package/lib/reanimated2/component/Text.js +4 -0
- package/lib/reanimated2/component/View.js +4 -0
- package/lib/reanimated2/core.js +5 -9
- package/lib/reanimated2/frameCallback/FrameCallbackRegistryJS.js +32 -0
- package/lib/reanimated2/frameCallback/FrameCallbackRegistryUI.js +47 -0
- package/lib/reanimated2/globals.d.ts +3 -0
- package/lib/reanimated2/hook/index.js +2 -0
- package/lib/reanimated2/hook/useAnimatedKeyboard.js +31 -0
- package/lib/reanimated2/hook/useAnimatedSensor.js +3 -3
- package/lib/reanimated2/hook/useFrameCallback.js +23 -0
- package/lib/reanimated2/hook/utils.js +0 -5
- package/lib/reanimated2/jestUtils.js +11 -3
- package/lib/reanimated2/js-reanimated/JSReanimated.js +7 -0
- package/lib/reanimated2/js-reanimated/global.js +36 -0
- package/lib/reanimated2/js-reanimated/index.js +0 -24
- package/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.js +1 -1
- package/lib/reanimated2/mock.js +6 -0
- package/lib/types/Animated.d.ts +8 -0
- package/lib/types/{lib/ConfigHelper.d.ts → ConfigHelper.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedEventEmitter.d.ts → ReanimatedEventEmitter.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.d.ts → ReanimatedModule.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.macos.d.ts → ReanimatedModule.macos.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.native.d.ts → ReanimatedModule.native.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.windows.d.ts → ReanimatedModule.windows.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModuleCompat.d.ts → ReanimatedModuleCompat.d.ts} +0 -0
- package/lib/types/{lib/createAnimatedComponent.d.ts → createAnimatedComponent.d.ts} +0 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/index.web.d.ts +3 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Bezier.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Colors.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Easing.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeMethods.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeReanimated/NativeReanimated.d.ts +3 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeReanimated/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/PlatformChecker.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/PropAdapters.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/UpdateProps.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/ViewDescriptorsSet.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/WorkletEventHandler.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/MutableValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/NativeReanimated.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/NativeReanimated.native.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/decay.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/delay.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/repeat.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/sequence.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/spring.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/styleAnimation.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/timing.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/util.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/commonTypes.d.ts +12 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/component/FlatList.d.ts +2 -2
- package/lib/types/reanimated2/component/Image.d.ts +3 -0
- package/lib/types/reanimated2/component/ScrollView.d.ts +3 -0
- package/lib/types/reanimated2/component/Text.d.ts +3 -0
- package/lib/types/reanimated2/component/View.d.ts +3 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/core.d.ts +0 -0
- package/lib/types/reanimated2/frameCallback/FrameCallbackRegistryJS.d.ts +7 -0
- package/lib/types/reanimated2/frameCallback/FrameCallbackRegistryUI.d.ts +10 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/Hooks.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/index.d.ts +3 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedGestureHandler.d.ts +0 -0
- package/lib/types/reanimated2/hook/useAnimatedKeyboard.d.ts +2 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedReaction.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedRef.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedScrollHandler.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedSensor.d.ts +1 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedStyle.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useDerivedValue.d.ts +0 -0
- package/lib/types/reanimated2/hook/useFrameCallback.d.ts +6 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useSharedValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/utils.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/interpolateColor.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/interpolation.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/jestUtils.d.ts +1 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/JSReanimated.d.ts +3 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/Mapper.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/MapperRegistry.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/MutableValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/commonTypes.d.ts +0 -0
- package/lib/types/reanimated2/js-reanimated/global.d.ts +2 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/LayoutAnimationRepository.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/Keyframe.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Bounce.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Default.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Fade.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Flip.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Lightspeed.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Pinwheel.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Roll.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Rotate.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Slide.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Stretch.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Zoom.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/FadingTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/LinearTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/mock.d.ts +6 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/platform-specific/RNRenderer.d.ts +0 -0
- package/lib/types/reanimated2/platform-specific/RNRenderer.web.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/utils.d.ts +0 -0
- package/lib/types/{lib/setAndForwardRef.d.ts → setAndForwardRef.d.ts} +0 -0
- package/mock.js +1 -0
- package/package.json +15 -10
- package/plugin.js +7 -6
- package/react-native-reanimated.d.ts +56 -8
- package/src/Animated.ts +13 -0
- package/src/index.ts +15 -0
- package/src/index.web.ts +5 -0
- package/src/reanimated2/Colors.ts +1 -1
- package/src/reanimated2/NativeMethods.ts +5 -0
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +10 -1
- package/src/reanimated2/animation/sequence.ts +0 -5
- package/src/reanimated2/animation/util.ts +8 -1
- package/src/reanimated2/commonTypes.ts +15 -0
- package/src/reanimated2/component/FlatList.tsx +32 -25
- package/src/reanimated2/component/Image.ts +6 -0
- package/src/reanimated2/component/ScrollView.ts +6 -0
- package/src/reanimated2/component/Text.ts +6 -0
- package/src/reanimated2/component/View.ts +6 -0
- package/src/reanimated2/core.ts +8 -13
- package/src/reanimated2/frameCallback/FrameCallbackRegistryJS.ts +43 -0
- package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +64 -0
- package/src/reanimated2/globals.d.ts +3 -0
- package/src/reanimated2/hook/index.ts +3 -0
- package/src/reanimated2/hook/useAnimatedKeyboard.ts +35 -0
- package/src/reanimated2/hook/useAnimatedSensor.ts +5 -5
- package/src/reanimated2/hook/useFrameCallback.ts +39 -0
- package/src/reanimated2/hook/utils.ts +0 -6
- package/src/reanimated2/jestUtils.ts +11 -3
- package/src/reanimated2/js-reanimated/JSReanimated.ts +16 -1
- package/src/reanimated2/js-reanimated/global.ts +45 -0
- package/src/reanimated2/js-reanimated/index.ts +0 -31
- package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +1 -1
- package/src/reanimated2/mock.ts +6 -0
- package/android/react-native-reanimated-64-hermes.aar +0 -0
- package/android/react-native-reanimated-64-jsc.aar +0 -0
- package/android/react-native-reanimated-65-hermes.aar +0 -0
- package/android/react-native-reanimated-65-jsc.aar +0 -0
- package/lib/reanimated2/component/WrappedComponents.js +0 -9
- package/lib/reanimated2/component/index.js +0 -4
- package/lib/types/lib/reanimated2/component/WrappedComponents.d.ts +0 -8
- package/lib/types/lib/reanimated2/component/index.d.ts +0 -9
- package/lib/types/react-native-reanimated-tests.d.ts +0 -1
- package/src/Animated.js +0 -22
- package/src/reanimated2/component/WrappedComponents.ts +0 -11
- package/src/reanimated2/component/index.ts +0 -9
package/android/CMakeLists.txt
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
project(Reanimated)
|
|
2
|
+
cmake_minimum_required(VERSION 3.12.0)
|
|
2
3
|
|
|
3
4
|
set (CMAKE_VERBOSE_MAKEFILE ON)
|
|
4
|
-
set (CMAKE_CXX_STANDARD
|
|
5
|
-
set (
|
|
5
|
+
set (CMAKE_CXX_STANDARD 17)
|
|
6
|
+
set (DEFAULT_FLAGS "-DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DON_ANDROID -DONANDROID -DANDROID -DRNVERSION=${RNVERSION} -fexceptions -fno-omit-frame-pointer -frtti -Wno-sign-compare -std=c++17 -Wall")
|
|
7
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
8
|
+
set (ALL_FLAGS "${DEFAULT_FLAGS} -DRCT_NEW_ARCH_ENABLED")
|
|
9
|
+
else()
|
|
10
|
+
set (ALL_FLAGS ${DEFAULT_FLAGS})
|
|
11
|
+
endif()
|
|
12
|
+
set (CMAKE_CXX_FLAGS ${ALL_FLAGS})
|
|
6
13
|
|
|
7
14
|
if(${NATIVE_DEBUG})
|
|
8
15
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
|
|
@@ -13,56 +20,66 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
13
20
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
|
14
21
|
|
|
15
22
|
set (PACKAGE_NAME "reanimated")
|
|
23
|
+
set (BUILD_DIR ${CMAKE_SOURCE_DIR}/build)
|
|
16
24
|
set (SRC_DIR ${CMAKE_SOURCE_DIR}/src)
|
|
17
25
|
|
|
26
|
+
set (ignoreMe "${PLAYGROUND_APP_NAME}")
|
|
27
|
+
|
|
18
28
|
if(${CLIENT_SIDE_BUILD})
|
|
19
|
-
set (NODE_MODULES_DIR "${CMAKE_SOURCE_DIR}/../../")
|
|
20
29
|
set (COMMON_SRC_DIR "${CMAKE_SOURCE_DIR}/../Common")
|
|
21
30
|
else()
|
|
22
|
-
set (NODE_MODULES_DIR "../node_modules")
|
|
23
31
|
set (COMMON_SRC_DIR "${SRC_DIR}/main/Common")
|
|
24
32
|
endif()
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
35
|
+
if(${CLIENT_SIDE_BUILD})
|
|
36
|
+
set (RN_SO_DIR "${CMAKE_SOURCE_DIR}/../../../android/app/build/react-ndk/exported")
|
|
37
|
+
set (FBJNI_HEADERS_DIR "${CMAKE_SOURCE_DIR}/../../react-native/ReactAndroid/src/main/jni/first-party/fbjni/headers")
|
|
38
|
+
else()
|
|
39
|
+
set (RN_SO_DIR "${CMAKE_SOURCE_DIR}/../${PLAYGROUND_APP_NAME}/android/app/build/react-ndk/exported")
|
|
40
|
+
set (FBJNI_HEADERS_DIR "${CMAKE_SOURCE_DIR}/../${PLAYGROUND_APP_NAME}/node_modules/react-native/ReactAndroid/src/main/jni/first-party/fbjni/headers")
|
|
41
|
+
endif()
|
|
42
|
+
else()
|
|
43
|
+
set (RN_SO_DIR ${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni/first-party/react/jni)
|
|
44
|
+
set (FBJNI_HEADERS_DIR "${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni/first-party/fbjni/headers")
|
|
45
|
+
endif()
|
|
28
46
|
|
|
29
|
-
|
|
47
|
+
file (GLOB LIBRN_DIR "${RN_SO_DIR}/${ANDROID_ABI}")
|
|
30
48
|
|
|
31
|
-
file(
|
|
32
|
-
file(
|
|
33
|
-
file(GLOB sources_shared_items "${COMMON_SRC_DIR}/cpp/SharedItems/*.cpp")
|
|
34
|
-
file(GLOB sources_registries "${COMMON_SRC_DIR}/cpp/Registries/*.cpp")
|
|
35
|
-
file(GLOB sources_android "${SRC_DIR}/main/cpp/*.cpp")
|
|
49
|
+
file(GLOB_RECURSE SOURCES_COMMON CONFIGURE_DEPENDS "${COMMON_SRC_DIR}/cpp/**.cpp")
|
|
50
|
+
file(GLOB_RECURSE SOURCES_ANDROID CONFIGURE_DEPENDS "${SRC_DIR}/main/cpp/**.cpp")
|
|
36
51
|
|
|
37
52
|
if(${REACT_NATIVE_TARGET_VERSION} LESS 66)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
set (
|
|
54
|
+
INCLUDE_JSI_CPP
|
|
55
|
+
"${NODE_MODULES_DIR}/react-native/ReactCommon/jsi/jsi/jsi.cpp"
|
|
56
|
+
)
|
|
57
|
+
set (
|
|
58
|
+
INCLUDE_JSIDYNAMIC_CPP
|
|
59
|
+
"${NODE_MODULES_DIR}/react-native/ReactCommon/jsi/jsi/JSIDynamic.cpp"
|
|
60
|
+
)
|
|
61
|
+
endif()
|
|
62
|
+
|
|
63
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
64
|
+
set(
|
|
65
|
+
FABRIC_UTILS_CPP
|
|
66
|
+
"${COMMON_SRC_DIR}/cpp/Fabric/FabricUtils.cpp"
|
|
67
|
+
)
|
|
68
|
+
set(
|
|
69
|
+
REANIMATED_UI_MANAGER_BINDING_CPP
|
|
70
|
+
"${COMMON_SRC_DIR}/cpp/Fabric/ReanimatedUIManagerBinding.cpp"
|
|
71
|
+
)
|
|
46
72
|
endif()
|
|
47
73
|
|
|
48
74
|
add_library(
|
|
49
75
|
${PACKAGE_NAME}
|
|
50
76
|
SHARED
|
|
51
|
-
${
|
|
52
|
-
${
|
|
53
|
-
${sources_registries}
|
|
54
|
-
${sources_android}
|
|
55
|
-
${source_tools}
|
|
77
|
+
${SOURCES_COMMON}
|
|
78
|
+
${SOURCES_ANDROID}
|
|
56
79
|
${INCLUDE_JSI_CPP}
|
|
57
80
|
${INCLUDE_JSIDYNAMIC_CPP}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"${COMMON_SRC_DIR}/cpp/Tools/RuntimeDecorator.cpp"
|
|
61
|
-
"${COMMON_SRC_DIR}/cpp/Tools/Scheduler.cpp"
|
|
62
|
-
"${COMMON_SRC_DIR}/cpp/Tools/WorkletEventHandler.cpp"
|
|
63
|
-
"${COMMON_SRC_DIR}/cpp/Tools/FeaturesConfig.cpp"
|
|
64
|
-
"${COMMON_SRC_DIR}/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp"
|
|
65
|
-
"${COMMON_SRC_DIR}/cpp/AnimatedSensor/AnimatedSensorModule.cpp"
|
|
81
|
+
${FABRIC_UTILS_CPP}
|
|
82
|
+
${REANIMATED_UI_MANAGER_BINDING_CPP}
|
|
66
83
|
)
|
|
67
84
|
|
|
68
85
|
# includes
|
|
@@ -81,12 +98,15 @@ target_include_directories(
|
|
|
81
98
|
"${NODE_MODULES_DIR}/react-native/React/Base"
|
|
82
99
|
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni"
|
|
83
100
|
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni"
|
|
101
|
+
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/jni"
|
|
84
102
|
"${NODE_MODULES_DIR}/react-native/ReactCommon"
|
|
85
103
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/callinvoker"
|
|
86
104
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/jsi"
|
|
105
|
+
"${NODE_MODULES_DIR}/react-native/ReactCommon/react/renderer/graphics/platform/cxx"
|
|
106
|
+
"${NODE_MODULES_DIR}/react-native/ReactCommon/runtimeexecutor"
|
|
87
107
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/turbomodule/core"
|
|
88
108
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/turbomodule"
|
|
89
|
-
"${NODE_MODULES_DIR}/
|
|
109
|
+
"${NODE_MODULES_DIR}/react-native/ReactCommon/yoga"
|
|
90
110
|
"${COMMON_SRC_DIR}/cpp/headers/Tools"
|
|
91
111
|
"${COMMON_SRC_DIR}/cpp/headers/SpecTools"
|
|
92
112
|
"${COMMON_SRC_DIR}/cpp/headers/NativeModules"
|
|
@@ -94,51 +114,27 @@ target_include_directories(
|
|
|
94
114
|
"${COMMON_SRC_DIR}/cpp/headers/Registries"
|
|
95
115
|
"${COMMON_SRC_DIR}/cpp/headers/LayoutAnimations"
|
|
96
116
|
"${COMMON_SRC_DIR}/cpp/headers/AnimatedSensor"
|
|
117
|
+
"${COMMON_SRC_DIR}/cpp/headers/Fabric"
|
|
97
118
|
"${COMMON_SRC_DIR}/cpp/hidden_headers"
|
|
98
119
|
"${SRC_DIR}/main/cpp/headers"
|
|
99
120
|
)
|
|
100
121
|
|
|
101
|
-
# find libraries
|
|
102
|
-
|
|
103
|
-
file (GLOB LIBRN_DIR "${RN_SO_DIR}/${ANDROID_ABI}")
|
|
104
|
-
file (GLOB HERMES_DIR "${BUILD_DIR}/third-party-ndk/hermes/jni/${ANDROID_ABI}")
|
|
105
|
-
|
|
106
122
|
find_library(
|
|
107
123
|
LOG_LIB
|
|
108
124
|
log
|
|
109
125
|
)
|
|
110
|
-
find_library(
|
|
111
|
-
HERMES_LIB
|
|
112
|
-
hermes
|
|
113
|
-
PATHS ${HERMES_DIR}
|
|
114
|
-
NO_CMAKE_FIND_ROOT_PATH
|
|
115
|
-
)
|
|
116
|
-
find_library(
|
|
117
|
-
JSEXECUTOR_LIB
|
|
118
|
-
jscexecutor
|
|
119
|
-
PATHS ${LIBRN_DIR}
|
|
120
|
-
NO_CMAKE_FIND_ROOT_PATH
|
|
121
|
-
)
|
|
122
|
-
find_library(
|
|
123
|
-
FOLLY_JSON_LIB
|
|
124
|
-
folly_json
|
|
125
|
-
PATHS ${LIBRN_DIR}
|
|
126
|
-
NO_CMAKE_FIND_ROOT_PATH
|
|
127
|
-
)
|
|
128
126
|
find_library(
|
|
129
127
|
REACT_NATIVE_JNI_LIB
|
|
130
128
|
reactnativejni
|
|
131
129
|
PATHS ${LIBRN_DIR}
|
|
132
130
|
NO_CMAKE_FIND_ROOT_PATH
|
|
133
131
|
)
|
|
134
|
-
|
|
135
132
|
find_library(
|
|
136
133
|
GLOG_LIB
|
|
137
134
|
glog
|
|
138
135
|
PATHS ${LIBRN_DIR}
|
|
139
136
|
NO_CMAKE_FIND_ROOT_PATH
|
|
140
137
|
)
|
|
141
|
-
|
|
142
138
|
find_library(
|
|
143
139
|
FBJNI_LIB
|
|
144
140
|
fbjni
|
|
@@ -146,44 +142,180 @@ find_library(
|
|
|
146
142
|
NO_CMAKE_FIND_ROOT_PATH
|
|
147
143
|
)
|
|
148
144
|
|
|
145
|
+
if(${REACT_NATIVE_TARGET_VERSION} LESS 69)
|
|
146
|
+
find_library(
|
|
147
|
+
FOLLY_LIB
|
|
148
|
+
folly_json
|
|
149
|
+
PATHS ${LIBRN_DIR}
|
|
150
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
151
|
+
)
|
|
152
|
+
else()
|
|
153
|
+
find_library(
|
|
154
|
+
FOLLY_LIB
|
|
155
|
+
folly_runtime
|
|
156
|
+
PATHS ${LIBRN_DIR}
|
|
157
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
158
|
+
)
|
|
159
|
+
endif()
|
|
160
|
+
|
|
149
161
|
if(${REACT_NATIVE_TARGET_VERSION} LESS 66)
|
|
150
|
-
|
|
162
|
+
set (JSI_LIB "")
|
|
151
163
|
else()
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
164
|
+
find_library(
|
|
165
|
+
JSI_LIB
|
|
166
|
+
jsi
|
|
167
|
+
PATHS ${LIBRN_DIR}
|
|
168
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
169
|
+
)
|
|
170
|
+
endif()
|
|
171
|
+
|
|
172
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
173
|
+
find_library(
|
|
174
|
+
REACT_RENDER_UIMANAGER
|
|
175
|
+
react_render_uimanager
|
|
176
|
+
PATHS ${LIBRN_DIR}
|
|
177
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
178
|
+
)
|
|
179
|
+
find_library(
|
|
180
|
+
REACT_RENDER_MOUNTING
|
|
181
|
+
react_render_mounting
|
|
182
|
+
PATHS ${LIBRN_DIR}
|
|
183
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
184
|
+
)
|
|
185
|
+
find_library(
|
|
186
|
+
REACT_RENDER_COMPONENTREGISTRY
|
|
187
|
+
react_render_componentregistry
|
|
188
|
+
PATHS ${LIBRN_DIR}
|
|
189
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
190
|
+
)
|
|
191
|
+
find_library(
|
|
192
|
+
REACT_RENDER_CORE
|
|
193
|
+
react_render_core
|
|
194
|
+
PATHS ${LIBRN_DIR}
|
|
195
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
196
|
+
)
|
|
197
|
+
find_library(
|
|
198
|
+
REACT_DEBUG
|
|
199
|
+
react_debug
|
|
200
|
+
PATHS ${LIBRN_DIR}
|
|
201
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
202
|
+
)
|
|
203
|
+
find_library(
|
|
204
|
+
REACT_RENDER_DEBUG
|
|
205
|
+
react_render_debug
|
|
206
|
+
PATHS ${LIBRN_DIR}
|
|
207
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
208
|
+
)
|
|
209
|
+
find_library(
|
|
210
|
+
RRC_ROOT
|
|
211
|
+
rrc_root
|
|
212
|
+
PATHS ${LIBRN_DIR}
|
|
213
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
214
|
+
)
|
|
215
|
+
find_library(
|
|
216
|
+
RRC_VIEW
|
|
217
|
+
rrc_view
|
|
218
|
+
PATHS ${LIBRN_DIR}
|
|
219
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
220
|
+
)
|
|
221
|
+
find_library(
|
|
222
|
+
REACT_RENDER_SCHEDULER
|
|
223
|
+
react_render_scheduler
|
|
224
|
+
PATHS ${LIBRN_DIR}
|
|
225
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
226
|
+
)
|
|
227
|
+
find_library(
|
|
228
|
+
FABRICJNI
|
|
229
|
+
fabricjni
|
|
230
|
+
PATHS ${LIBRN_DIR}
|
|
231
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
232
|
+
)
|
|
158
233
|
endif()
|
|
159
234
|
|
|
160
235
|
# build shared lib
|
|
161
236
|
|
|
162
237
|
set_target_properties(${PACKAGE_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
|
163
238
|
|
|
164
|
-
|
|
239
|
+
|
|
240
|
+
target_link_libraries(
|
|
241
|
+
${PACKAGE_NAME}
|
|
242
|
+
${LOG_LIB}
|
|
243
|
+
${JSI_LIB}
|
|
244
|
+
${GLOG_LIB}
|
|
245
|
+
${FBJNI_LIB}
|
|
246
|
+
${FOLLY_LIB}
|
|
247
|
+
${REACT_NATIVE_JNI_LIB}
|
|
248
|
+
android
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
if(${JS_RUNTIME} STREQUAL "hermes")
|
|
252
|
+
string(APPEND CMAKE_CXX_FLAGS " -DJS_RUNTIME_HERMES=1")
|
|
253
|
+
if(${REACT_NATIVE_TARGET_VERSION} LESS 69)
|
|
254
|
+
# From `hermes-engine` npm package
|
|
255
|
+
target_include_directories(
|
|
256
|
+
${PACKAGE_NAME}
|
|
257
|
+
PRIVATE
|
|
258
|
+
"${JS_RUNTIME_DIR}/android/include"
|
|
259
|
+
)
|
|
260
|
+
else()
|
|
261
|
+
# Bundled Hermes from module `com.facebook.react:hermes-engine` or project `:ReactAndroid:hermes-engine`
|
|
262
|
+
target_include_directories(
|
|
263
|
+
${PACKAGE_NAME}
|
|
264
|
+
PRIVATE
|
|
265
|
+
"${JS_RUNTIME_DIR}/API"
|
|
266
|
+
"${JS_RUNTIME_DIR}/public"
|
|
267
|
+
)
|
|
268
|
+
endif()
|
|
165
269
|
target_link_libraries(
|
|
166
270
|
${PACKAGE_NAME}
|
|
167
|
-
${
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
${
|
|
173
|
-
|
|
174
|
-
|
|
271
|
+
"${BUILD_DIR}/third-party-ndk/hermes/jni/${ANDROID_ABI}/libhermes.so"
|
|
272
|
+
)
|
|
273
|
+
elseif(${JS_RUNTIME} STREQUAL "v8")
|
|
274
|
+
string(APPEND CMAKE_CXX_FLAGS " -DJS_RUNTIME_V8=1")
|
|
275
|
+
target_include_directories(
|
|
276
|
+
${PACKAGE_NAME}
|
|
277
|
+
PRIVATE
|
|
278
|
+
"${JS_RUNTIME_DIR}/src"
|
|
279
|
+
)
|
|
280
|
+
file (GLOB V8_SO_DIR "${JS_RUNTIME_DIR}/android/build/intermediates/library_jni/*/jni/${ANDROID_ABI}")
|
|
281
|
+
find_library(
|
|
282
|
+
V8EXECUTOR_LIB
|
|
283
|
+
v8executor
|
|
284
|
+
PATHS ${V8_SO_DIR}
|
|
285
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
286
|
+
)
|
|
287
|
+
target_link_libraries(
|
|
288
|
+
${PACKAGE_NAME}
|
|
289
|
+
${V8EXECUTOR_LIB}
|
|
175
290
|
)
|
|
176
291
|
else()
|
|
292
|
+
set (ignoreMe "${JS_RUNTIME_DIR}")
|
|
293
|
+
string(APPEND CMAKE_CXX_FLAGS " -DJS_RUNTIME_JSC=1")
|
|
294
|
+
find_library(
|
|
295
|
+
JSEXECUTOR_LIB
|
|
296
|
+
jscexecutor
|
|
297
|
+
PATHS ${LIBRN_DIR}
|
|
298
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
299
|
+
)
|
|
177
300
|
target_link_libraries(
|
|
178
301
|
${PACKAGE_NAME}
|
|
179
|
-
${LOG_LIB}
|
|
180
|
-
${JSI_LIB}
|
|
181
302
|
${JSEXECUTOR_LIB}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
303
|
+
)
|
|
304
|
+
endif()
|
|
305
|
+
|
|
306
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
307
|
+
target_link_libraries(
|
|
308
|
+
${PACKAGE_NAME}
|
|
309
|
+
${REACT_RENDER_UIMANAGER}
|
|
310
|
+
${REACT_RENDER_MOUNTING}
|
|
311
|
+
${REACT_RENDER_COMPONENTREGISTRY}
|
|
312
|
+
${REACT_RENDER_CORE}
|
|
313
|
+
${REACT_DEBUG}
|
|
314
|
+
${REACT_RENDER_DEBUG}
|
|
315
|
+
${RRC_ROOT}
|
|
316
|
+
${RRC_VIEW}
|
|
317
|
+
${FABRICJNI}
|
|
318
|
+
${REACT_RENDER_SCHEDULER}
|
|
187
319
|
)
|
|
188
320
|
endif()
|
|
189
321
|
|
|
@@ -195,4 +327,4 @@ if(${REACT_NATIVE_TARGET_VERSION} LESS 64)
|
|
|
195
327
|
# Provides a relative path to your source file(s).
|
|
196
328
|
./empty.cpp
|
|
197
329
|
)
|
|
198
|
-
endif()
|
|
330
|
+
endif()
|