Skip to content

Commit

Permalink
Support React Native 0.76 (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw authored Sep 12, 2024
1 parent 8ce1772 commit 14342fb
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 41 deletions.
20 changes: 15 additions & 5 deletions android/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,18 @@ find_package(fbjni REQUIRED CONFIG)
find_package(ReactAndroid REQUIRED CONFIG)
find_package(hermes-engine REQUIRED CONFIG)

target_link_libraries(${CMAKE_PROJECT_NAME}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::reactnativejni
hermes-engine::libhermes)
if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(${CMAKE_PROJECT_NAME}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::reactnative
hermes-engine::libhermes)
elseif (ReactAndroid_VERSION_MINOR GREATER_EQUAL 75)
target_link_libraries(${CMAKE_PROJECT_NAME}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::reactnativejni
hermes-engine::libhermes)
else ()
message(FATAL_ERROR "react-native-live-markdown requires react-native 0.75 or newer.")
endif ()
83 changes: 47 additions & 36 deletions android/src/main/new_arch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,42 +36,53 @@ target_include_directories(

find_package(ReactAndroid REQUIRED CONFIG)

target_link_libraries(
${LIB_TARGET_NAME}
ReactAndroid::rrc_text
ReactAndroid::rrc_textinput
ReactAndroid::react_render_textlayoutmanager
ReactAndroid::react_render_imagemanager
ReactAndroid::reactnativejni
ReactAndroid::mapbufferjni
fabricjni
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_core
react_render_debug
react_render_graphics
react_render_mapbuffer
ReactAndroid::react_render_uimanager
ReactAndroid::react_render_scheduler
react_utils
runtimeexecutor
rrc_view
turbomodulejsijni
yoga
android
log
mapbufferjni
reactnativejni
react_render_consistency
react_performance_timeline
react_render_observers_events
react_featureflags
)
if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(
${LIB_TARGET_NAME}
ReactAndroid::reactnative
ReactAndroid::jsi
fbjni::fbjni
)
elseif (ReactAndroid_VERSION_MINOR GREATER_EQUAL 75)
target_link_libraries(
${LIB_TARGET_NAME}
ReactAndroid::rrc_text
ReactAndroid::rrc_textinput
ReactAndroid::react_render_textlayoutmanager
ReactAndroid::react_render_imagemanager
ReactAndroid::reactnativejni
ReactAndroid::mapbufferjni
fabricjni
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_core
react_render_debug
react_render_graphics
react_render_mapbuffer
ReactAndroid::react_render_uimanager
ReactAndroid::react_render_scheduler
react_utils
runtimeexecutor
rrc_view
turbomodulejsijni
yoga
android
log
mapbufferjni
reactnativejni
react_render_consistency
react_performance_timeline
react_render_observers_events
react_featureflags
)
else ()
message(FATAL_ERROR "react-native-live-markdown requires react-native 0.75 or newer.")
endif ()

target_compile_options(
${LIB_TARGET_NAME}
Expand Down

0 comments on commit 14342fb

Please sign in to comment.