Skip to content

Commit

Permalink
Expose react_utils via prefab to fix broken test_android (#37965)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #37965

test_android is currently failing as we're not shipping the implementation of one of the symbol inside `react_utils`
which is now accessed by the `ConcreteComponentDescriptor.h` file (used by the app project).

Either we expose `react_utils` as a static library (.a) or as a dynamic library (.so). I've decided to go for the latter
for the sake of saving space on user devices.

Changelog:
[Internal] [Changed] - Expose react_utils via prefab to fix broken test_android

Reviewed By: sammy-SC

Differential Revision: D46841689

fbshipit-source-id: a5467ca3a7ac2f26f7a5a2c4d6e161a391766b0d
  • Loading branch information
cortinico authored and facebook-github-bot committed Jun 19, 2023
1 parent 3d6a2a9 commit 9101e44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/react-native/ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
new Pair("src/main/jni/react/jni", "react/jni/"),
]
),
new PrefabPreprocessingEntry(
"react_utils",
new Pair("../ReactCommon/react/utils/", "react/utils/"),
),
new PrefabPreprocessingEntry(
"react_render_imagemanager",
[
Expand Down Expand Up @@ -488,6 +492,7 @@ android {
"runtimeexecutor",
"react_codegen_rncore",
"react_debug",
"react_utils",
"react_render_componentregistry",
"react_newarchdefaults",
"react_render_animations",
Expand Down Expand Up @@ -585,6 +590,9 @@ android {
react_debug {
headers(new File(prefabHeadersDir, "react_debug").absolutePath)
}
react_utils {
headers(new File(prefabHeadersDir, "react_utils").absolutePath)
}
react_render_componentregistry {
headers(new File(prefabHeadersDir, "react_render_componentregistry").absolutePath)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ add_library(turbomodulejsijni ALIAS ReactAndroid::turbomodulejsijni)
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_utils ALIAS ReactAndroid::react_utils)
add_library(react_render_componentregistry ALIAS ReactAndroid::react_render_componentregistry)
add_library(react_newarchdefaults ALIAS ReactAndroid::react_newarchdefaults)
add_library(react_render_core ALIAS ReactAndroid::react_render_core)
Expand Down Expand Up @@ -95,6 +96,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
jsi # prefab ready
react_codegen_rncore # prefab ready
react_debug # prefab ready
react_utils # prefab ready
react_nativemodule_core # prefab ready
react_newarchdefaults # prefab ready
react_render_componentregistry # prefab ready
Expand Down

0 comments on commit 9101e44

Please sign in to comment.