Skip to content

Commit

Permalink
Move react_newarchdefaults to be consumed via prefab
Browse files Browse the repository at this point in the history
Summary:
This removes the old way of consuming `react_newarchdefaults.so` from
`Android-prebuilt.cmake` to using Prefab which is natively supported
by the Android pipeline.

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

Reviewed By: cipolleschi

Differential Revision: D39857115

fbshipit-source-id: 194a75b530b21e593b0390565a3b91155e07f17e
  • Loading branch information
cortinico authored and facebook-github-bot committed Sep 29, 2022
1 parent bc1bc36 commit 268a4cb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
11 changes: 9 additions & 2 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
"react_render_componentregistry",
new Pair("../ReactCommon/react/renderer/componentregistry/", "react/renderer/componentregistry/")
),
new PrefabPreprocessingEntry(
"react_newarchdefaults",
new Pair("src/main/jni/react/newarchdefaults", "")
)
]
)
it.outputDir.set(prefabHeadersDir)
Expand Down Expand Up @@ -338,15 +342,15 @@ android {
"jsijniprofiler",
"reactnativeblob",
"reactperfloggerjni",
"react_newarchdefaults",
"fabricjni",
// prefab targets
"react_render_debug",
"turbomodulejsijni",
"runtimeexecutor",
"react_codegen_rncore",
"react_debug",
"react_render_componentregistry"
"react_render_componentregistry",
"react_newarchdefaults"
}
}
ndk {
Expand Down Expand Up @@ -435,6 +439,9 @@ android {
react_render_componentregistry {
headers(new File(prefabHeadersDir, "react_render_componentregistry").absolutePath)
}
react_newarchdefaults {
headers(new File(prefabHeadersDir, "react_newarchdefaults").absolutePath)
}
}

publishing {
Expand Down
8 changes: 0 additions & 8 deletions ReactAndroid/cmake-utils/Android-prebuilt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,6 @@ set_target_properties(fabricjni
${REACT_NDK_EXPORT_DIR}/${ANDROID_ABI}/libfabricjni.so)
target_include_directories(fabricjni INTERFACE ${REACT_ANDROID_SRC_DIR}/jni/react/fabric)

## react_newarchdefaults
add_library(react_newarchdefaults SHARED IMPORTED GLOBAL)
set_target_properties(react_newarchdefaults
PROPERTIES
IMPORTED_LOCATION
${REACT_NDK_EXPORT_DIR}/${ANDROID_ABI}/libreact_newarchdefaults.so)
target_include_directories(react_newarchdefaults INTERFACE ${REACT_ANDROID_SRC_DIR}/jni/react/newarchdefaults)

## jsi
add_library(jsi SHARED IMPORTED GLOBAL)
set_target_properties(jsi
Expand Down
3 changes: 2 additions & 1 deletion ReactAndroid/cmake-utils/ReactNative-application.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ add_library(runtimeexecutor ALIAS ReactAndroid::runtimeexecutor)
add_library(react_codegen_rncore ALIAS ReactAndroid::react_codegen_rncore)
add_library(react_debug ALIAS ReactAndroid::react_debug)
add_library(react_render_componentregistry ALIAS ReactAndroid::react_render_componentregistry)
add_library(react_newarchdefaults ALIAS ReactAndroid::react_newarchdefaults)

target_link_libraries(${CMAKE_PROJECT_NAME}
fabricjni
Expand All @@ -57,7 +58,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
react_codegen_rncore # prefab ready
react_debug # prefab ready
react_nativemodule_core
react_newarchdefaults
react_newarchdefaults # prefab ready
react_render_componentregistry # prefab ready
react_render_core
react_render_debug # prefab ready
Expand Down

0 comments on commit 268a4cb

Please sign in to comment.