Skip to content

Commit 54a4fcb

Browse files
SparshaSahafacebook-github-bot
authored andcommitted
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: #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
1 parent 39b48b1 commit 54a4fcb

File tree

6 files changed

+5
-34
lines changed

6 files changed

+5
-34
lines changed

ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ target_link_libraries(
4444
react_render_uimanager
4545
react_utils
4646
react_config
47-
reactnativeutilsjni
47+
reactnativejni
4848
rrc_image
4949
rrc_modal
5050
rrc_progressbar

ReactAndroid/src/main/jni/react/jni/CMakeLists.txt

-29
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
cmake_minimum_required(VERSION 3.13)
77
set(CMAKE_VERBOSE_MAKEFILE on)
88

9-
# TODO Those two libraries are building against the same sources
10-
# and should probably be merged
119
file(GLOB reactnativejni_SRC CONFIGURE_DEPENDS *.cpp)
1210

1311
add_compile_options(
@@ -17,32 +15,6 @@ add_compile_options(
1715
-std=c++17
1816
-DWITH_INSPECTOR=1)
1917

20-
##########################
21-
### React Native Utils ###
22-
##########################
23-
24-
add_library(
25-
reactnativeutilsjni
26-
SHARED
27-
${reactnativejni_SRC}
28-
)
29-
30-
# TODO This should not be ../../
31-
target_include_directories(reactnativeutilsjni PUBLIC ../../)
32-
33-
target_link_libraries(reactnativeutilsjni
34-
android
35-
callinvokerholder
36-
fb
37-
fbjni
38-
folly_runtime
39-
glog_init
40-
react_render_runtimescheduler
41-
reactnative
42-
runtimeexecutor
43-
yoga
44-
)
45-
4618
######################
4719
### reactnativejni ###
4820
######################
@@ -67,7 +39,6 @@ target_link_libraries(reactnativejni
6739
logger
6840
react_render_runtimescheduler
6941
reactnative
70-
reactnativeutilsjni
7142
runtimeexecutor
7243
yoga
7344
)

ReactCommon/react/renderer/components/progressbar/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ target_link_libraries(rrc_progressbar
2828
react_render_debug
2929
react_render_graphics
3030
react_render_uimanager
31-
reactnativeutilsjni
31+
reactnativejni
3232
rrc_view
3333
yoga
3434
)

ReactCommon/react/renderer/components/slider/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ target_link_libraries(rrc_slider
3131
react_render_imagemanager
3232
react_render_mapbuffer
3333
react_render_uimanager
34-
reactnativeutilsjni
34+
reactnativejni
3535
rrc_image
3636
rrc_view
3737
yoga

ReactCommon/react/renderer/components/switch/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ target_link_libraries(
2828
react_render_debug
2929
react_render_graphics
3030
react_render_uimanager
31-
reactnativeutilsjni
31+
reactnativejni
3232
rrc_view
3333
yoga
3434
)

ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ target_link_libraries(react_render_textlayoutmanager
4040
react_render_telemetry
4141
react_render_uimanager
4242
react_utils
43-
reactnativeutilsjni
43+
reactnativejni
4444
yoga
4545
)

0 commit comments

Comments
 (0)