From 2131a5dd53d2d6756baeefa3d29676186e6ca3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E9=B9=8F?= Date: Sat, 18 Jan 2025 18:37:27 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20Modify=20the=20package.json=20of=20the?= =?UTF-8?q?=20example=20project=20Signed-off-by:=20=E6=9E=97=E5=BF=97?= =?UTF-8?q?=E9=B9=8F=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OAT.xml | 4 +++- example/harmony/build-profile.template.json5 | 2 +- .../entry/src/main/cpp/PackageProvider.cpp | 3 ++- example/package.json | 9 +++++---- harmony/checkbox/.gitignore | 7 +++++++ harmony/checkbox/BuildProfile.ets | 17 ----------------- 6 files changed, 18 insertions(+), 24 deletions(-) create mode 100644 harmony/checkbox/.gitignore delete mode 100644 harmony/checkbox/BuildProfile.ets diff --git a/OAT.xml b/OAT.xml index 2da30d6..f226cea 100644 --- a/OAT.xml +++ b/OAT.xml @@ -57,6 +57,7 @@ + @@ -99,12 +100,13 @@ + - + diff --git a/example/harmony/build-profile.template.json5 b/example/harmony/build-profile.template.json5 index af94131..c7852e4 100644 --- a/example/harmony/build-profile.template.json5 +++ b/example/harmony/build-profile.template.json5 @@ -4,7 +4,7 @@ { "name": 'default', "signingConfig": 'default', - "compileSdkVersion": '5.0.0(12)', + "compileSdkVersion": '5.0.1(13)', "compatibleSdkVersion": '5.0.0(12)', "runtimeOS": 'HarmonyOS' }, diff --git a/example/harmony/entry/src/main/cpp/PackageProvider.cpp b/example/harmony/entry/src/main/cpp/PackageProvider.cpp index 5f52c66..fa18195 100644 --- a/example/harmony/entry/src/main/cpp/PackageProvider.cpp +++ b/example/harmony/entry/src/main/cpp/PackageProvider.cpp @@ -4,7 +4,8 @@ using namespace rnoh; -std::vector> PackageProvider::getPackages(Package::Context ctx) { +std::vector> PackageProvider::getPackages(Package::Context ctx) +{ return {std::make_shared(ctx), // generated by codegen v1 std::make_shared(ctx)}; } \ No newline at end of file diff --git a/example/package.json b/example/package.json index 896fd0f..bab336d 100644 --- a/example/package.json +++ b/example/package.json @@ -3,7 +3,8 @@ "version": "1.0.0", "private": true, "scripts": { - "i": "cd ../ && npm i && npm run pack:prod && cd ./example && npm i", + "fast-install-project": "cd ../ && npm i --legacy-peer-deps && npm run pack:prod && cd ./example && npm i --legacy-peer-deps", + "fast:pkg": "npm run fast-install-project && npm run dev", "reStart": "npm run install:pkg && npm run codegen && hdc rport tcp:8081 tcp:8081 && react-native start", "start": "hdc rport tcp:8081 tcp:8081 && react-native start", "codegen": "react-native codegen-harmony --rnoh-module-path ./harmony/entry/oh_modules/@rnoh/react-native-openharmony", @@ -16,7 +17,7 @@ "dependencies": { "@gorhom/portal": "^1.0.14", "@react-native-ohos/checkbox": "file:../react-native-ohos-checkbox-0.5.17-rc.1.tgz", - "@rnoh/testerino": "file:rnoh_package/rnoh-testerino-0.0.9.tgz", + "@rnoh/testerino": "npm:@react-native-oh-tpl/testerino@0.0.9", "react": "18.2.0", "react-native": "0.72.5", "react-native-harmony": "npm:@react-native-oh/react-native-harmony@^0.72.32" @@ -57,10 +58,10 @@ }, "overrides": { "@rnoh/react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@^0.0.27", - "@react-native-community/cli": "11.3.6", + "@react-native-community/cli": "11.4.1", "@react-native/codegen": "0.74.0" }, "resolutions": { - "@react-native-community/cli": "11.3.6" + "@react-native-community/cli": "11.4.1" } } diff --git a/harmony/checkbox/.gitignore b/harmony/checkbox/.gitignore new file mode 100644 index 0000000..a7382af --- /dev/null +++ b/harmony/checkbox/.gitignore @@ -0,0 +1,7 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test +/BuildProfile.ets \ No newline at end of file diff --git a/harmony/checkbox/BuildProfile.ets b/harmony/checkbox/BuildProfile.ets deleted file mode 100644 index 9529f50..0000000 --- a/harmony/checkbox/BuildProfile.ets +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Use these variables when you tailor your ArkTS code. They must be of the const type. - */ -export const HAR_VERSION = '0.5.17-rc.1'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; -export const TARGET_NAME = 'default'; - -/** - * BuildProfile Class is used only for compatibility purposes. - */ -export default class BuildProfile { - static readonly HAR_VERSION = HAR_VERSION; - static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; - static readonly DEBUG = DEBUG; - static readonly TARGET_NAME = TARGET_NAME; -} \ No newline at end of file -- Gitee