Move runtimeexecutor to be consumed via prefab

Summary:
This removes the old way of consuming `runtimeexecutor` from
`Android-prebuilt.cmake` to using Prefab which is natively supported
by the Android pipeline.

Changelog:
[Internal] [Changed] - Move `runtimeexecutor` to be consumed via prefab

Reviewed By: cipolleschi

Differential Revision: D39852978

fbshipit-source-id: 87795118f1bcf496a3c50791f920d8b230932555
This commit is contained in:
Nicola Corti
2022-09-28 08:32:03 -07:00
committed by Facebook GitHub Bot
parent 4bcb0ab762
commit 83048da5b8
3 changed files with 12 additions and 11 deletions
+10 -2
View File
@@ -69,7 +69,11 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
new PrefabPreprocessingEntry(
"turbomodulejsijni",
new Pair("src/main/jni/react/turbomodule", "")
)
),
new PrefabPreprocessingEntry(
"runtimeexecutor",
new Pair("../ReactCommon/runtimeexecutor/", "")
),
]
)
it.outputDir.set(prefabHeadersDir)
@@ -326,7 +330,8 @@ android {
"fabricjni",
// prefab targets
"react_render_debug",
"turbomodulejsijni"
"turbomodulejsijni",
"runtimeexecutor"
}
}
ndk {
@@ -403,6 +408,9 @@ android {
turbomodulejsijni {
headers(new File(prefabHeadersDir, "turbomodulejsijni").absolutePath)
}
runtimeexecutor {
headers(new File(prefabHeadersDir, "runtimeexecutor").absolutePath)
}
}
publishing {
@@ -209,13 +209,5 @@ set_target_properties(react_codegen_rncore
${REACT_NDK_EXPORT_DIR}/${ANDROID_ABI}/libreact_codegen_rncore.so)
target_include_directories(react_codegen_rncore INTERFACE ${REACT_GENERATED_SRC_DIR}/codegen/jni)
## runtimeexecutor
add_library(runtimeexecutor SHARED IMPORTED GLOBAL)
set_target_properties(runtimeexecutor
PROPERTIES
IMPORTED_LOCATION
${REACT_NDK_EXPORT_DIR}/${ANDROID_ABI}/libruntimeexecutor.so)
target_include_directories(runtimeexecutor INTERFACE ${REACT_COMMON_DIR}/runtimeexecutor)
## fbjni
add_subdirectory(${FIRST_PARTY_NDK_DIR}/fbjni fbjni_build)
@@ -43,6 +43,7 @@ target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Werror -fexceptions
find_package(ReactAndroid REQUIRED CONFIG)
add_library(react_render_debug ALIAS ReactAndroid::react_render_debug)
add_library(turbomodulejsijni ALIAS ReactAndroid::turbomodulejsijni)
add_library(runtimeexecutor ALIAS ReactAndroid::runtimeexecutor)
target_link_libraries(${CMAKE_PROJECT_NAME}
fabricjni
@@ -60,7 +61,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
react_render_graphics
react_render_mapbuffer
rrc_view
runtimeexecutor
runtimeexecutor # prefab ready
turbomodulejsijni # prefab ready
yoga)