diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 044d737a83d..bdcbc41c00b 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -65,6 +65,10 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa new PrefabPreprocessingEntry( "react_render_debug", new Pair("../ReactCommon/react/renderer/debug/", "react/renderer/debug/") + ), + new PrefabPreprocessingEntry( + "turbomodulejsijni", + new Pair("src/main/jni/react/turbomodule", "") ) ] ) @@ -319,10 +323,10 @@ android { "reactnativeblob", "reactperfloggerjni", "react_newarchdefaults", - "turbomodulejsijni", "fabricjni", // prefab targets - "react_render_debug" + "react_render_debug", + "turbomodulejsijni" } } ndk { @@ -396,6 +400,9 @@ android { react_render_debug { headers(new File(prefabHeadersDir, "react_render_debug").absolutePath) } + turbomodulejsijni { + headers(new File(prefabHeadersDir, "turbomodulejsijni").absolutePath) + } } publishing { diff --git a/ReactAndroid/cmake-utils/Android-prebuilt.cmake b/ReactAndroid/cmake-utils/Android-prebuilt.cmake index e5345ba9f11..0a12f99e2e3 100644 --- a/ReactAndroid/cmake-utils/Android-prebuilt.cmake +++ b/ReactAndroid/cmake-utils/Android-prebuilt.cmake @@ -103,16 +103,6 @@ target_include_directories(react_nativemodule_core ${REACT_COMMON_DIR}/react/nativemodule/core/platform/android) target_link_libraries(react_nativemodule_core INTERFACE folly_runtime) -## turbomodulejsijni -add_library(turbomodulejsijni SHARED IMPORTED GLOBAL) -set_target_properties(turbomodulejsijni - PROPERTIES - IMPORTED_LOCATION - ${REACT_NDK_EXPORT_DIR}/${ANDROID_ABI}/libturbomodulejsijni.so) -target_include_directories(turbomodulejsijni - INTERFACE - ${REACT_ANDROID_SRC_DIR}/jni/react/turbomodule) - ## react_render_core add_library(react_render_core SHARED IMPORTED GLOBAL) set_target_properties(react_render_core diff --git a/ReactAndroid/cmake-utils/ReactNative-application.cmake b/ReactAndroid/cmake-utils/ReactNative-application.cmake index 01dc432fd39..822ffbb6b62 100644 --- a/ReactAndroid/cmake-utils/ReactNative-application.cmake +++ b/ReactAndroid/cmake-utils/ReactNative-application.cmake @@ -42,6 +42,7 @@ target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Werror -fexceptions # Prefab packages find_package(ReactAndroid REQUIRED CONFIG) add_library(react_render_debug ALIAS ReactAndroid::react_render_debug) +add_library(turbomodulejsijni ALIAS ReactAndroid::turbomodulejsijni) target_link_libraries(${CMAKE_PROJECT_NAME} fabricjni @@ -60,7 +61,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME} react_render_mapbuffer rrc_view runtimeexecutor - turbomodulejsijni + turbomodulejsijni # prefab ready yoga) # If project is on RN CLI v9, then we can use the following lines to link against the autolinked 3rd party libraries.