Skip to content

Commit

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

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

Reviewed By: cipolleschi

Differential Revision: D39924231

fbshipit-source-id: 231809631f807ea2ea40d2581759f391adfba94d
  • Loading branch information
cortinico authored and facebook-github-bot committed Sep 29, 2022
1 parent 93bb05a commit 7c55e6c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 9 additions & 1 deletion ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
new Pair("../ReactCommon/react/renderer/graphics/", "react/renderer/graphics/"),
new Pair("../ReactCommon/react/renderer/graphics/platform/cxx/", ""),
]
),
new PrefabPreprocessingEntry(
"rrc_view",
new Pair("../ReactCommon/react/renderer/components/view/", "react/renderer/components/view/")
)
]
)
Expand Down Expand Up @@ -363,7 +367,8 @@ android {
"react_render_componentregistry",
"react_newarchdefaults",
"react_render_core",
"react_render_graphics"
"react_render_graphics",
"rrc_view"
}
}
ndk {
Expand Down Expand Up @@ -461,6 +466,9 @@ android {
react_render_graphics {
headers(new File(prefabHeadersDir, "react_render_graphics").absolutePath)
}
rrc_view {
headers(new File(prefabHeadersDir, "rrc_view").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 @@ -130,14 +130,6 @@ set_target_properties(react_render_mapbuffer
${REACT_NDK_EXPORT_DIR}/${ANDROID_ABI}/libreact_render_mapbuffer.so)
target_include_directories(react_render_mapbuffer INTERFACE ${REACT_COMMON_DIR}/react/renderer/mapbuffer)

## rrc_view
add_library(rrc_view SHARED IMPORTED GLOBAL)
set_target_properties(rrc_view
PROPERTIES
IMPORTED_LOCATION
${REACT_NDK_EXPORT_DIR}/${ANDROID_ABI}/librrc_view.so)
target_include_directories(rrc_view INTERFACE ${REACT_COMMON_DIR}/react/renderer/components/view)

## fabricjni
add_library(fabricjni SHARED IMPORTED GLOBAL)
set_target_properties(fabricjni
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 @@ -50,6 +50,7 @@ add_library(react_render_componentregistry ALIAS ReactAndroid::react_render_comp
add_library(react_newarchdefaults ALIAS ReactAndroid::react_newarchdefaults)
add_library(react_render_core ALIAS ReactAndroid::react_render_core)
add_library(react_render_graphics ALIAS ReactAndroid::react_render_graphics)
add_library(rrc_view ALIAS ReactAndroid::rrc_view)

target_link_libraries(${CMAKE_PROJECT_NAME}
fabricjni
Expand All @@ -66,7 +67,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
react_render_debug # prefab ready
react_render_graphics # prefab ready
react_render_mapbuffer
rrc_view
rrc_view # prefab ready
runtimeexecutor # prefab ready
turbomodulejsijni # prefab ready
yoga)
Expand Down

0 comments on commit 7c55e6c

Please sign in to comment.