Removing reactnativeutilsjni as it is built from the same sources as reactnativejni (#34339)
Summary: This Pull Request aims at removing the making of reactnativeutilsjni as it is built from the same sources as reactnativejni. It also replaces references to reactnativeutilsjni with reactnativejni. This should get rid of `reactnativeutilsjni.so` while reusing `reactnativejni.so` in it's place. This should give us some size improvements in the finally built apk. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Changed] - Replaced reactnativeutilsjni with reactnativejni in the build process to reduce size Pull Request resolved: https://github.com/facebook/react-native/pull/34339 Test Plan: 1. Ran the CMakelist.txt file using CMake and I could see that reactnativeutilsjni.dir is no longer generated with my changes. 2. Built the aar from this branch in Android Studio and build happened successfully. I am not sure if we could run any more tests. Please let me know in case anymore testing is required and I can do accordingly Reviewed By: cortinico Differential Revision: D38400481 Pulled By: genkikondo fbshipit-source-id: 592736e56441328389ae89135667c336ff8018e6
This commit is contained in:
Родитель
39b48b1c1d
Коммит
54a4fcbfdc
|
@ -44,7 +44,7 @@ target_link_libraries(
|
|||
react_render_uimanager
|
||||
react_utils
|
||||
react_config
|
||||
reactnativeutilsjni
|
||||
reactnativejni
|
||||
rrc_image
|
||||
rrc_modal
|
||||
rrc_progressbar
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
# TODO Those two libraries are building against the same sources
|
||||
# and should probably be merged
|
||||
file(GLOB reactnativejni_SRC CONFIGURE_DEPENDS *.cpp)
|
||||
|
||||
add_compile_options(
|
||||
|
@ -17,32 +15,6 @@ add_compile_options(
|
|||
-std=c++17
|
||||
-DWITH_INSPECTOR=1)
|
||||
|
||||
##########################
|
||||
### React Native Utils ###
|
||||
##########################
|
||||
|
||||
add_library(
|
||||
reactnativeutilsjni
|
||||
SHARED
|
||||
${reactnativejni_SRC}
|
||||
)
|
||||
|
||||
# TODO This should not be ../../
|
||||
target_include_directories(reactnativeutilsjni PUBLIC ../../)
|
||||
|
||||
target_link_libraries(reactnativeutilsjni
|
||||
android
|
||||
callinvokerholder
|
||||
fb
|
||||
fbjni
|
||||
folly_runtime
|
||||
glog_init
|
||||
react_render_runtimescheduler
|
||||
reactnative
|
||||
runtimeexecutor
|
||||
yoga
|
||||
)
|
||||
|
||||
######################
|
||||
### reactnativejni ###
|
||||
######################
|
||||
|
@ -67,7 +39,6 @@ target_link_libraries(reactnativejni
|
|||
logger
|
||||
react_render_runtimescheduler
|
||||
reactnative
|
||||
reactnativeutilsjni
|
||||
runtimeexecutor
|
||||
yoga
|
||||
)
|
||||
|
|
|
@ -28,7 +28,7 @@ target_link_libraries(rrc_progressbar
|
|||
react_render_debug
|
||||
react_render_graphics
|
||||
react_render_uimanager
|
||||
reactnativeutilsjni
|
||||
reactnativejni
|
||||
rrc_view
|
||||
yoga
|
||||
)
|
||||
|
|
|
@ -31,7 +31,7 @@ target_link_libraries(rrc_slider
|
|||
react_render_imagemanager
|
||||
react_render_mapbuffer
|
||||
react_render_uimanager
|
||||
reactnativeutilsjni
|
||||
reactnativejni
|
||||
rrc_image
|
||||
rrc_view
|
||||
yoga
|
||||
|
|
|
@ -28,7 +28,7 @@ target_link_libraries(
|
|||
react_render_debug
|
||||
react_render_graphics
|
||||
react_render_uimanager
|
||||
reactnativeutilsjni
|
||||
reactnativejni
|
||||
rrc_view
|
||||
yoga
|
||||
)
|
||||
|
|
|
@ -40,6 +40,6 @@ target_link_libraries(react_render_textlayoutmanager
|
|||
react_render_telemetry
|
||||
react_render_uimanager
|
||||
react_utils
|
||||
reactnativeutilsjni
|
||||
reactnativejni
|
||||
yoga
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче