diff --git a/README.md b/README.md index b6817298ac69443e2463b9b63c26a816a964bd4d..65512f114b40032fa7e49bdae9e4989550eaa8ad 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,8 @@ 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 -2. HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 +2. HarmonyOS系统:HarmonyOS 5.0.5 Release及以上。 -3. DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 +3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file diff --git a/README_EN.md b/README_EN.md index 1ba9cb7b08378485698691998eca3b8809f97fa3..e45366ed606f8b94db577da9f75422e00445f199 100644 --- a/README_EN.md +++ b/README_EN.md @@ -55,18 +55,17 @@ Note: When running an app, you need to set **Deploy Multi Hap**. Tap **Edit Conf │ └──Util.ets // ArkTS methods └──sharedModule/src/main // HSP module ├──cpp -│ ├──types // Interfaces exposed by the native layer -│ │ └──libfile_access // Interfaces exposed to the UI layer -│ ├──CMakeLists.txt // Compilation entry -│ ├──napi_hsp.cpp // Native methods provided by the HSP module -│ ├──napi_hsp.h // napi_hsp header file +│ ├──types // Interfaces exposed by the native layer +│ │ └──libfile_access // Interfaces exposed to the UI layer +│ ├──CMakeLists.txt // Compilation entry +│ ├──napi_hsp.cpp // Native methods provided by the HSP module +│ ├──napi_hsp.h // napi_hsp header file │ └──napi_init.cpp -└──ets // UI layer +└──ets // UI layer ├──components │ └──MainPage.ets └──utils -└──Calc.ets // ArkTS methods - +└──Calc.ets // ArkTS methods ``` ### How to Implement * Create **staticModule** (HAR) and **sharedModule** (HSP) and configure the corresponding dependencies in **oh-package.json5** of **entry**. @@ -86,8 +85,8 @@ N/A 1. The sample is only supported on Huawei phones with standard systems. -2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later. +2. The HarmonyOS version must be HarmonyOS 5.0.5 Release or later. -3. The DevEco Studio version must be DevEco Studio 5.0.0 Release or later. +3. The DevEco Studio version must be DevEco Studio 5.0.5 Release or later. -4. The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release SDK or later. \ No newline at end of file +4. The HarmonyOS SDK version must be HarmonyOS 5.0.5 Release SDK or later. \ No newline at end of file diff --git a/build-profile.json5 b/build-profile.json5 index 57760a7527912901c9f7c9f39c9ed1189d095fd6..45721b94ad33164cc27562e30df3924baa51930f 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -6,7 +6,8 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.5(17)", + "targetSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS", "buildOption": { "strictMode": { diff --git a/entry/obfuscation-rules.txt b/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entry/oh_modules/static_module/src/main/cpp/napi_har.h b/entry/oh_modules/static_module/src/main/cpp/napi_har.h deleted file mode 100644 index a419b4210729a2b75d2215aa02487d903b6bb668..0000000000000000000000000000000000000000 --- a/entry/oh_modules/static_module/src/main/cpp/napi_har.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -* Copyright (C) 2024 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -// [Start napi_har_start] -// [Start har_start] -// staticModule\src\main\cpp\napi_har.h -#ifndef CROSSMODULEREFERENCE_NAPI_HAR_H -#define CROSSMODULEREFERENCE_NAPI_HAR_H -#include -// [StartExclude napi_har_start] -napi_env g_main_env; -void setHarEnv(napi_env env); -// [EndExclude napi_har_start] -double harNativeAdd(double a, double b); -napi_value harArkTSAdd(double a, double b); -#endif //CROSSMODULEREFERENCE_NAPI_HAR_H -// [End har_start] -// [End napi_har_start] \ No newline at end of file diff --git a/entry/oh_modules/static_module/src/main/cpp/napi_har1.h b/entry/oh_modules/static_module/src/main/cpp/napi_har1.h deleted file mode 100644 index 8c9cf7ad9c8112819d897d93c9a5300aaa830cf8..0000000000000000000000000000000000000000 --- a/entry/oh_modules/static_module/src/main/cpp/napi_har1.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -* Copyright (C) 2024 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -// [Start napi_har_start] -// staticModule\src\main\cpp\napi_har.h -#ifndef CROSSMODULEREFERENCE_NAPI_HAR_H -#define CROSSMODULEREFERENCE_NAPI_HAR_H -#include -double harNativeAdd(double a, double b); -#endif //CROSSMODULEREFERENCE_NAPI_HAR_H -// [End napi_har_start] \ No newline at end of file diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index a1cea8b6a4560cee7bda7a2db52f310c035ab6c8..ad219d733f6afa5ea07f85f580208b08cc3b9041 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -5,9 +5,7 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "phone" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/sharedModule/src/main/module.json5 b/sharedModule/src/main/module.json5 index b06784741a6e1cb93961c15e6e645180f935c831..bbe4e8ba02af7499dfdfb587ef153af9adb96cda 100644 --- a/sharedModule/src/main/module.json5 +++ b/sharedModule/src/main/module.json5 @@ -4,9 +4,7 @@ "type": "shared", "description": "$string:shared_desc", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "phone" ], "deliveryWithInstall": true, "pages": "$profile:main_pages" diff --git a/staticModule/src/main/module.json5 b/staticModule/src/main/module.json5 index affaabaa2e59174a186f412c4d006e63e9030e8e..3ef836a65f36d70f858a34c1c7e976048013241f 100644 --- a/staticModule/src/main/module.json5 +++ b/staticModule/src/main/module.json5 @@ -3,9 +3,7 @@ "name": "staticModule", "type": "har", "deviceTypes": [ - "default", - "tablet", - "2in1" + "default" ] } } \ No newline at end of file