Skip to content

Commit d17c239

Browse files
committed
update example
1 parent be88e34 commit d17c239

6 files changed

Lines changed: 10 additions & 18 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
matrix:
2424
node-version: [20.x]
2525

26-
steps:
26+
2727
- uses: actions/checkout@v4
2828
- uses: oven-sh/setup-bun@v2
2929
- uses: actions/setup-node@v6

Example/harmony_use_pushy/bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/harmony_use_pushy/harmony/entry/oh-package-lock.json5

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/harmony_use_pushy/harmony/entry/oh-package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
license: '',
88
dependencies: {
99
'@rnoh/react-native-openharmony': '0.72.96',
10-
pushy: 'file:../../../../harmony/pushy.har',
10+
pushy: 'file:../../node_modules/react-native-update/harmony/pushy.har',
1111
},
1212
}

Example/harmony_use_pushy/harmony/entry/src/main/cpp/CMakeLists.txt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,8 @@ set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
1313
add_compile_definitions(WITH_HITRACE_SYSTRACE)
1414

1515
set(PUSHY_CPP_DIR "${NODE_MODULES}/react-native-update/harmony/pushy/src/main/cpp")
16-
set(PUSHY_TURBO_MODULE_CPP "${PUSHY_CPP_DIR}/PushyTurboModule.cpp")
17-
if(NOT EXISTS "${PUSHY_TURBO_MODULE_CPP}")
18-
message(FATAL_ERROR "Cannot find Pushy glue source in node_modules: ${PUSHY_TURBO_MODULE_CPP}")
19-
endif()
2016
add_subdirectory("${RNOH_CPP_DIR}" ./rn)
2117

22-
# Build only the RNOH glue here. librnupdate.so is provided by pushy.har.
23-
add_library(rnoh_pushy SHARED "${PUSHY_TURBO_MODULE_CPP}")
24-
target_include_directories(rnoh_pushy PUBLIC "${PUSHY_CPP_DIR}")
25-
target_link_libraries(rnoh_pushy PUBLIC rnoh)
26-
2718
file(GLOB GENERATED_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/generated/*.cpp") # this line is needed by codegen v1
2819

2920
add_library(rnoh_app SHARED
@@ -32,5 +23,6 @@ add_library(rnoh_app SHARED
3223
"${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
3324
)
3425
target_include_directories(rnoh_app PRIVATE "${PUSHY_CPP_DIR}")
26+
# Pushy's RNOH glue is compiled into rnoh_app directly. librnupdate.so comes from pushy.har.
27+
target_sources(rnoh_app PRIVATE "${PUSHY_CPP_DIR}/PushyTurboModule.cpp")
3528
target_link_libraries(rnoh_app PUBLIC rnoh)
36-
target_link_libraries(rnoh_app PUBLIC rnoh_pushy)

Example/harmony_use_pushy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@react-native-oh/react-native-harmony": "0.72.96",
1616
"react": "18.2.0",
1717
"react-native": "0.72.5",
18-
"react-native-update": "^10.37.15"
18+
"react-native-update": "^10.37.16"
1919
},
2020
"devDependencies": {
2121
"@babel/core": "^7.20.0",

0 commit comments

Comments
 (0)