diff --git a/AppColdStart/HapAndHarDependHar/AppScope/app.json5 b/AppColdStart/HapAndHarDependHar/AppScope/app.json5 deleted file mode 100644 index 86cc9b85e3d6376e23d256dffccbcdd1d59b4e6e..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/AppScope/app.json5 +++ /dev/null @@ -1,10 +0,0 @@ -{ - "app": { - "bundleName": "com.example.coldstart", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name" - } -} diff --git a/AppColdStart/HapAndHarDependHar/AppScope/resources/base/element/string.json b/AppColdStart/HapAndHarDependHar/AppScope/resources/base/element/string.json deleted file mode 100644 index 7b173461f58b7687bc9b8423941cb83b96c12069..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ColdStart" - } - ] -} diff --git a/AppColdStart/HapAndHarDependHar/AppScope/resources/base/media/app_icon.png b/AppColdStart/HapAndHarDependHar/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index a39445dc87828b76fed6d2ec470dd455c45319e3..0000000000000000000000000000000000000000 Binary files a/AppColdStart/HapAndHarDependHar/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/AppColdStart/HapAndHarDependHar/build-profile.json5 b/AppColdStart/HapAndHarDependHar/build-profile.json5 deleted file mode 100644 index 2c03ac0f094d139e2ae61c76ed8a58d81a0d8dcd..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/build-profile.json5 +++ /dev/null @@ -1,43 +0,0 @@ -{ - "app": { - "signingConfigs": [], - "products": [ - { - "name": "default", - "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", - "runtimeOS": "HarmonyOS", - } - ], - "buildModeSet": [ - { - "name": "debug", - }, - { - "name": "release" - } - ] - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - }, - { - "name": "har_library", - "srcPath": "./library" - }, - { - "name": "har_common", - "srcPath": "./har_common", - } - ] -} \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/entry/build-profile.json5 b/AppColdStart/HapAndHarDependHar/entry/build-profile.json5 deleted file mode 100644 index b695582d3680556f4cce2ec518f65720a9413ca3..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/build-profile.json5 +++ /dev/null @@ -1,28 +0,0 @@ -{ - "apiType": "stageMode", - "buildOption": { - }, - "buildOptionSet": [ - { - "name": "release", - "arkOptions": { - "obfuscation": { - "ruleOptions": { - "enable": true, - "files": [ - "./obfuscation-rules.txt" - ] - } - } - } - }, - ], - "targets": [ - { - "name": "default" - }, - { - "name": "ohosTest", - } - ] -} \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/entry/hvigorfile.ts b/AppColdStart/HapAndHarDependHar/entry/hvigorfile.ts deleted file mode 100644 index c6edcd90486dd5a853cf7d34c8647f08414ca7a3..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/hvigorfile.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { hapTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ -} diff --git a/AppColdStart/HapAndHarDependHar/entry/oh-package.json5 b/AppColdStart/HapAndHarDependHar/entry/oh-package.json5 deleted file mode 100644 index 0fde17fdf11b4e1e509993c6079ea76c582de11a..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/oh-package.json5 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "entry", - "version": "1.0.0", - "description": "Please describe the basic information.", - "main": "", - "author": "", - "license": "", - "dependencies": { - "har_library": "file:../library", - "har_common": "file:../har_common" - } -} - diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/ets/entryability/EntryAbility.ets b/AppColdStart/HapAndHarDependHar/entry/src/main/ets/entryability/EntryAbility.ets deleted file mode 100644 index aa7b8e4d139fe8671c5a382b0f8b80e5335c6c52..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/src/main/ets/entryability/EntryAbility.ets +++ /dev/null @@ -1,57 +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. -*/ - -import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { window } from '@kit.ArkUI'; - - -export default class EntryAbility extends UIAbility { - onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); - } - - onDestroy(): void { - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage): void { - // Main window is created, set main page for this ability - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); - - windowStage.loadContent('pages/Index', (err) => { - if (err.code) { - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); - }); - } - - onWindowStageDestroy(): void { - // Main window is destroyed, release UI related resources - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); - } - - onForeground(): void { - // Ability has brought to foreground - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); - } - - onBackground(): void { - // Ability has back to background - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); - } -} diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/ets/pages/Index.ets b/AppColdStart/HapAndHarDependHar/entry/src/main/ets/pages/Index.ets deleted file mode 100644 index 6413cae7d4867bc242c0a89f91d560ffd08780a2..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/src/main/ets/pages/Index.ets +++ /dev/null @@ -1,35 +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. -*/ - -// DocsCode 1 -// entry/src/main/ets/pages/Index.ets -import { MainPage } from 'har_library'; -import { funcResult } from 'har_common'; -// DocsCode 1 - -@Entry -@Component -struct Index { - @State message: string = 'Hello World' + funcResult; - - build() { - Row() { - // 引用HAR的ArkUI组件 - MainPage() - } - .height('100%') - .width('100%') - } -} diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/module.json5 b/AppColdStart/HapAndHarDependHar/entry/src/main/module.json5 deleted file mode 100644 index 3b355d125c7bb7b28090d101652243c5facbd9ba..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/src/main/module.json5 +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "description": "$string:module_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "phone" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntry": "./ets/entryability/EntryAbility.ets", - "description": "$string:EntryAbility_desc", - "icon": "$media:layered_image", - "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:startIcon", - "startWindowBackground": "$color:start_window_background", - "exported": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/element/color.json b/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962da3c2751c2b9ddb53559afcbd2b54a02..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/element/string.json b/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/element/string.json deleted file mode 100644 index f94595515a99e0c828807e243494f57f09251930..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/background.png b/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/background.png deleted file mode 100644 index f939c9fa8cc8914832e602198745f592a0dfa34d..0000000000000000000000000000000000000000 Binary files a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/background.png and /dev/null differ diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/foreground.png b/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/foreground.png deleted file mode 100644 index 4483ddad1f079e1089d685bd204ee1cfe1d01902..0000000000000000000000000000000000000000 Binary files a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/foreground.png and /dev/null differ diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/layered_image.json b/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/layered_image.json deleted file mode 100644 index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/layered_image.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "layered-image": - { - "background" : "$media:background", - "foreground" : "$media:foreground" - } -} \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/startIcon.png b/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/startIcon.png deleted file mode 100644 index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000 Binary files a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/media/startIcon.png and /dev/null differ diff --git a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/profile/main_pages.json b/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/Index" - ] -} diff --git a/AppColdStart/HapAndHarDependHar/har_common/Index.ets b/AppColdStart/HapAndHarDependHar/har_common/Index.ets deleted file mode 100644 index 557674ecc19a7d3bf7692082e2713e2e6883fcf0..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/har_common/Index.ets +++ /dev/null @@ -1,16 +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. -*/ - -export { funcResult } from './src/main/ets/utils/Utils'; \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/har_common/obfuscation-rules.txt b/AppColdStart/HapAndHarDependHar/har_common/obfuscation-rules.txt deleted file mode 100644 index 985b2aeb7658286b17bd26eab8f217c3fe75ea8b..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/har_common/obfuscation-rules.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Define project specific obfuscation rules here. -# You can include the obfuscation configuration files in the current module's build-profile.json5. -# -# For more details, see -# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md - -# Obfuscation options: -# -disable-obfuscation: disable all obfuscations -# -enable-property-obfuscation: obfuscate the property names -# -enable-toplevel-obfuscation: obfuscate the names in the global scope -# -compact: remove unnecessary blank spaces and all line feeds -# -remove-log: remove all console.* statements -# -print-namecache: print the name cache that contains the mapping from the old names to new names -# -apply-namecache: reuse the given cache file - -# Keep options: -# -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/har_common/src/main/ets/components/mainpage/MainPage.ets b/AppColdStart/HapAndHarDependHar/har_common/src/main/ets/components/mainpage/MainPage.ets deleted file mode 100644 index 8fe31bb9fbcd035b0eddfd578f9b01099a294585..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/har_common/src/main/ets/components/mainpage/MainPage.ets +++ /dev/null @@ -1,31 +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. -*/ - -@Component -export struct MainPage { - @State message: string = 'Hello World'; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} diff --git a/AppColdStart/HapAndHarDependHar/har_common/src/main/ets/utils/Utils.ets b/AppColdStart/HapAndHarDependHar/har_common/src/main/ets/utils/Utils.ets deleted file mode 100644 index e22b4f60a4e92b96f9ecc8d1bb897af3994e8e8b..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/har_common/src/main/ets/utils/Utils.ets +++ /dev/null @@ -1,26 +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. -*/ - -const LARGE_NUMBER = 100000000; - -function func(): number { - let count = 0; - while (count < LARGE_NUMBER) { - count++; - } - return count; -} - -export let funcResult = func(); \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/hvigor/hvigor-config.json5 b/AppColdStart/HapAndHarDependHar/hvigor/hvigor-config.json5 deleted file mode 100644 index 06b2783670a348f95533b352c1ceda909a842bbc..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/hvigor/hvigor-config.json5 +++ /dev/null @@ -1,22 +0,0 @@ -{ - "modelVersion": "5.0.0", - "dependencies": { - }, - "execution": { - // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ - // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ - // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ - // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ - // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ - }, - "logging": { - // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ - }, - "debugging": { - // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ - }, - "nodeOptions": { - // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ - // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ - } -} diff --git a/AppColdStart/HapAndHarDependHar/hvigorfile.ts b/AppColdStart/HapAndHarDependHar/hvigorfile.ts deleted file mode 100644 index f3cb9f1a87a81687554a76283af8df27d8bda775..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/hvigorfile.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { appTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ -} diff --git a/AppColdStart/HapAndHarDependHar/library/build-profile.json5 b/AppColdStart/HapAndHarDependHar/library/build-profile.json5 deleted file mode 100644 index 697dff23e224373edb713dc2b8a08ed7341d5b4c..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/library/build-profile.json5 +++ /dev/null @@ -1,31 +0,0 @@ -{ - "apiType": "stageMode", - "buildOption": { - }, - "buildOptionSet": [ - { - "name": "release", - "arkOptions": { - "obfuscation": { - "ruleOptions": { - "enable": true, - "files": [ - "./obfuscation-rules.txt" - ] - }, - "consumerFiles": [ - "./consumer-rules.txt" - ] - } - }, - }, - ], - "targets": [ - { - "name": "default" - }, - { - "name": "ohosTest" - } - ] -} diff --git a/AppColdStart/HapAndHarDependHar/library/consumer-rules.txt b/AppColdStart/HapAndHarDependHar/library/consumer-rules.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/AppColdStart/HapAndHarDependHar/library/hvigorfile.ts b/AppColdStart/HapAndHarDependHar/library/hvigorfile.ts deleted file mode 100644 index 42187071482d292588ad40babeda74f7b8d97a23..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/library/hvigorfile.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { harTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ -} diff --git a/AppColdStart/HapAndHarDependHar/library/obfuscation-rules.txt b/AppColdStart/HapAndHarDependHar/library/obfuscation-rules.txt deleted file mode 100644 index 985b2aeb7658286b17bd26eab8f217c3fe75ea8b..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/library/obfuscation-rules.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Define project specific obfuscation rules here. -# You can include the obfuscation configuration files in the current module's build-profile.json5. -# -# For more details, see -# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md - -# Obfuscation options: -# -disable-obfuscation: disable all obfuscations -# -enable-property-obfuscation: obfuscate the property names -# -enable-toplevel-obfuscation: obfuscate the names in the global scope -# -compact: remove unnecessary blank spaces and all line feeds -# -remove-log: remove all console.* statements -# -print-namecache: print the name cache that contains the mapping from the old names to new names -# -apply-namecache: reuse the given cache file - -# Keep options: -# -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/library/oh-package.json5 b/AppColdStart/HapAndHarDependHar/library/oh-package.json5 deleted file mode 100644 index 3824a8247b7ff16278737ec539e98f7b88a8de55..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/library/oh-package.json5 +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "har_library", - "version": "1.0.0", - "description": "Please describe the basic information.", - "main": "Index.ets", - "author": "", - "license": "Apache-2.0", - "dependencies": { - "har_common": "file:../har_common" - } -} diff --git a/AppColdStart/HapAndHarDependHar/library/src/main/module.json5 b/AppColdStart/HapAndHarDependHar/library/src/main/module.json5 deleted file mode 100644 index 2892dab4fe007cb1eda74bd7189f3a55159038ff..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/library/src/main/module.json5 +++ /dev/null @@ -1,11 +0,0 @@ -{ - "module": { - "name": "har_library", - "type": "har", - "deviceTypes": [ - "default", - "tablet", - "2in1" - ] - } -} diff --git a/AppColdStart/HapAndHarDependHar/library/src/main/resources/zh_CN/element/string.json b/AppColdStart/HapAndHarDependHar/library/src/main/resources/zh_CN/element/string.json deleted file mode 100644 index f51a9c8461a55f6312ef950344e3145b7f82d607..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/library/src/main/resources/zh_CN/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "page_show", - "value": "page from package" - } - ] -} diff --git a/AppColdStart/HapAndHarDependHar/oh-package.json5 b/AppColdStart/HapAndHarDependHar/oh-package.json5 deleted file mode 100644 index 8bf916d4a165e0466c65bc49f58ab2e3c27e8931..0000000000000000000000000000000000000000 --- a/AppColdStart/HapAndHarDependHar/oh-package.json5 +++ /dev/null @@ -1,8 +0,0 @@ -{ - "modelVersion": "5.0.0", - "description": "Please describe the basic information.", - "dependencies": { - }, - "devDependencies": { - } -} diff --git a/AppColdStart/README.md b/AppColdStart/README.md index 1a372be2a36452a59004cec868c54fc03863b06c..d6e9ba0dfdd3bb26ad5e5a29c20b6d081b659020 100644 --- a/AppColdStart/README.md +++ b/AppColdStart/README.md @@ -16,23 +16,22 @@ │ │ └──EntryAbility.ets // 程序入口类 │ ├──entrybackupability │ │ └──EntryBackupAbility.ets // 数据备份恢复类 -│ ├──pages -│ │ ├──Index.ets // 使用columnStart/columnEnd设置GridItem大小示例:反例 -│ │ └──RightIndex.ets // 使用GridLayoutOptions设置GridItem大小:正例 -│ └──pages -│ ├──ColdStartSlow.ets // 冷启动缓慢示例 -│ ├──ColdStartSpeedOptimization.ets // 冷启快速示例 -│ ├──ComputeTaskAsync.ets // 异步任务示例 -│ ├──ImportMainPage.ets // 页面导入示例 -│ ├──ImportMainPageDemo.ets // 减少导入文件示例 -│ ├──ImportOthers.ets // 导入大量hsp示例 -│ ├──ImportSubPage.ets // 导入次级页面 -│ ├──Index.ets // 应用首页 -│ ├──NewIndex.ets // 展示网路图片首页 -│ ├──NotRecommendDemo.ets // 不推荐iport示例 -│ ├──ReduceImport.ets // 减少import导入示例 -│ ├──ScenariosExample.ets // 网络二次刷新示例 -│ └──SecondPage.ets // 跳转页面 +│ ├──pages +│ │ ├──ColdStartSlow.ets // 冷启动缓慢示例 +│ │ ├──ColdStartSpeedOptimization.ets // 冷启快速示例 +│ │ ├──ComputeTaskAsync.ets // 异步任务示例 +│ │ ├──ImportMainPage.ets // 页面导入示例 +│ │ ├──ImportMainPageDemo.ets // 减少导入文件示例 +│ │ ├──ImportSubPage.ets // 导入次级页面 +│ │ ├──Index.ets // 应用首页 +│ │ ├──NewIndex.ets // 展示网路图片首页 +│ │ ├──NotRecommendDemo.ets // 不推荐iport示例 +│ │ ├──ReduceImport.ets // 减少import导入示例 +│ │ ├──ScenariosExample.ets // 网络二次刷新示例 +│ │ └──SecondPage.ets // 跳转页面 +│ └──utils +│ ├──Calculator.ets // 耗时运算函数封装 +│ └──NetRequest.ets // 网络请求工具类 └──entry/src/main/resources // 应用资源目录 ``` diff --git a/AppColdStart/build-profile.json5 b/AppColdStart/build-profile.json5 index 9e87e7e6f19020fe21192844709f192cec80fd44..d29c0022c7b16b5b8cfd7bbfe52687958a32df0f 100644 --- a/AppColdStart/build-profile.json5 +++ b/AppColdStart/build-profile.json5 @@ -1,6 +1,20 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + { + "name": "default", + "type": "HarmonyOS", + "material": { + "certpath": "C:\\Users\\kl\\.ohos\\config\\default_AppColdStart_-fnlXvdddt9SYfS58rhRldI-qQdTDT_NAXAqmL-Msdg=.cer", + "keyAlias": "debugKey", + "keyPassword": "0000001BDEFF01BDD12394AAE82998123237A35048B4E294EE9CCF4B359BBC26909B747DF05697308E66A6", + "profile": "C:\\Users\\kl\\.ohos\\config\\default_AppColdStart_-fnlXvdddt9SYfS58rhRldI-qQdTDT_NAXAqmL-Msdg=.p7b", + "signAlg": "SHA256withECDSA", + "storeFile": "C:\\Users\\kl\\.ohos\\config\\default_AppColdStart_-fnlXvdddt9SYfS58rhRldI-qQdTDT_NAXAqmL-Msdg=.p12", + "storePassword": "0000001BF0E7FA2DEAD0416EA151766E4A76A6DABDE313D124406A0C68B85A8CCCC44A74055701B97C9598" + } + } + ], "products": [ { "name": "default", @@ -37,6 +51,10 @@ ] } ] + }, + { + "name": "library", + "srcPath": "./library", } ] } \ No newline at end of file diff --git a/AppColdStart/entry/.gitignore b/AppColdStart/entry/.gitignore deleted file mode 100644 index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/node_modules -/oh_modules -/.preview -/build -/.cxx -/.test \ No newline at end of file diff --git a/AppColdStart/entry/oh-package.json5 b/AppColdStart/entry/oh-package.json5 index 248c3b7541a589682a250f86a6d3ecf7414d2d6a..caa370f06bd44102373d4d518a2c11a0a1f9d8ee 100644 --- a/AppColdStart/entry/oh-package.json5 +++ b/AppColdStart/entry/oh-package.json5 @@ -5,6 +5,8 @@ "main": "", "author": "", "license": "", - "dependencies": {} + "dependencies": { + "library": "file:../library" + } } diff --git a/AppColdStart/entry/src/main/ets/entryability/EntryAbility.ets b/AppColdStart/entry/src/main/ets/entryability/EntryAbility.ets index 49c5e9274c0c4cbf8c74d83b289fdf85fad6270e..78fd17bfd32dfbbed632567bc53a000ef3d7e686 100644 --- a/AppColdStart/entry/src/main/ets/entryability/EntryAbility.ets +++ b/AppColdStart/entry/src/main/ets/entryability/EntryAbility.ets @@ -13,19 +13,52 @@ * limitations under the License. */ -// [Start my_ability_stage] -// MyAbilityStage.ets -import { AbilityStage, Want } from '@kit.AbilityKit'; -import { httpRequest } from '../utils/NetRequest'; -export default class MyAbilityStage extends AbilityStage { - onCreate(): void { - // Send a network request - httpRequest(); +// [Start entry_ability_demo] +import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { window } from '@kit.ArkUI' + +const LARGE_NUMBER: number = 100000000; +const DELAYED_TIME: number = 1000; + + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + // Time-consuming operation + // this.computeTask(); + this.computeTaskAsync(); // Asynchronous tasks + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + windowStage.loadContent('pages/Index', (err, data) => { + if (err.code) { + console.error('Failed to load the content. Cause: ' + JSON.stringify(err) ?? ''); + return; + } + console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data) ?? ''); + }); + + // Time-consuming operation + // this.computeTask(); + // this.computeTaskAsync(); // Asynchronous mission + } + + onForeground(): void { + // Time-consuming operation + // this.computeTask(); + // this.computeTaskAsync(); // Asynchronous mission + } + + private computeTask(): void { + let count: number = 0; + while (count < LARGE_NUMBER) { + count++; + } } - onAcceptWant(want: Want): string { - // Triggered in specified mode only. - return 'MyAbilityStage'; + private computeTaskAsync(): void { + setTimeout(() => { // SetTimeout is used here to achieve asynchronous delayed operation. + this.computeTask(); + }, DELAYED_TIME); } } -// [End my_ability_stage] \ No newline at end of file +// [End entry_ability_demo] \ No newline at end of file diff --git a/AppColdStart/entry/src/main/ets/entryability/EntryAbilityDemo.ets b/AppColdStart/entry/src/main/ets/entryability/EntryAbilityDemo.ets deleted file mode 100644 index b50f966ad5f080264bf94ae0c81ec9c0b05dfd3b..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/src/main/ets/entryability/EntryAbilityDemo.ets +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright (C) 2025 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 entry_ability_demo] -import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; -import { window } from '@kit.ArkUI' - -const LARGE_NUMBER = 100000000; -const DELAYED_TIME = 1000; - - -export default class EntryAbility extends UIAbility { - onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { - // Time-consuming operation - // this.computeTask(); - this.computeTaskAsync(); // Asynchronous tasks - } - - onWindowStageCreate(windowStage: window.WindowStage): void { - windowStage.loadContent('pages/Index', (err, data) => { - if (err.code) { - console.error('Failed to load the content. Cause: ' + JSON.stringify(err) ?? ''); - return; - } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data) ?? ''); - }); - - // Time-consuming operation - // this.computeTask(); - // this.computeTaskAsync(); // Asynchronous mission - } - - onForeground(): void { - // Time-consuming operation - // this.computeTask(); - // this.computeTaskAsync(); // Asynchronous mission - } - - private computeTask(): void { - let count = 0; - while (count < LARGE_NUMBER) { - count++; - } - } - - private computeTaskAsync(): void { - setTimeout(() => { // SetTimeout is used here to achieve asynchronous delayed operation. - this.computeTask(); - }, DELAYED_TIME); - } -} -// [End entry_ability_demo] \ No newline at end of file diff --git a/AppColdStart/entry/src/main/ets/entryability/MyAbilityStage.ets b/AppColdStart/entry/src/main/ets/entryability/MyAbilityStage.ets index 077f4e95408e6295a9eea2070a4337f30b852e1b..49c5e9274c0c4cbf8c74d83b289fdf85fad6270e 100644 --- a/AppColdStart/entry/src/main/ets/entryability/MyAbilityStage.ets +++ b/AppColdStart/entry/src/main/ets/entryability/MyAbilityStage.ets @@ -13,35 +13,19 @@ * limitations under the License. */ -// [Start reduce_ability_stage_time] +// [Start my_ability_stage] +// MyAbilityStage.ets import { AbilityStage, Want } from '@kit.AbilityKit'; - -const LARGE_NUMBER = 100000000; -const DELAYED_TIME = 1000; - +import { httpRequest } from '../utils/NetRequest'; export default class MyAbilityStage extends AbilityStage { onCreate(): void { - // Time-consuming operation - // this.computeTask(); - this.computeTaskAsync(); // Asynchronous mission + // Send a network request + httpRequest(); } onAcceptWant(want: Want): string { - // Trigger in specified mode only + // Triggered in specified mode only. return 'MyAbilityStage'; } - - private computeTask(): void { - let count = 0; - while (count < LARGE_NUMBER) { - count++; - } - } - - private computeTaskAsync(): void { - setTimeout(() => { // SetTimeout is used here to achieve asynchronous delayed operation. - this.computeTask(); - }, DELAYED_TIME); - } } -// [End reduce_ability_stage_time] \ No newline at end of file +// [End my_ability_stage] \ No newline at end of file diff --git a/AppColdStart/entry/src/main/ets/pages/ColdStartSlow.ets b/AppColdStart/entry/src/main/ets/pages/ColdStartSlow.ets index 6ccd04c362cdc97c6ce5a82579a14580db571bd4..4c4bfbff3a4671e7c2e5a6cb6e91b5227f67bf54 100644 --- a/AppColdStart/entry/src/main/ets/pages/ColdStartSlow.ets +++ b/AppColdStart/entry/src/main/ets/pages/ColdStartSlow.ets @@ -14,8 +14,7 @@ */ // [Start cold_start_slow] -const LARGE_NUMBER = 200000000; -const DELAYED_TIME = 1000; +const LARGE_NUMBER: number = 200000000; @Entry @Component @@ -28,7 +27,7 @@ struct Index { } computeTask(): void { - let count = 0; + let count: number = 0; while (count < LARGE_NUMBER) { count++; } diff --git a/AppColdStart/entry/src/main/ets/pages/ColdStartSpeedOptimization.ets b/AppColdStart/entry/src/main/ets/pages/ColdStartSpeedOptimization.ets index 1c9d5938af0b922954cd9858f6c6e87b53d38913..31fa4fefa9abb679057c8f5bb2e42464a1baf8f0 100644 --- a/AppColdStart/entry/src/main/ets/pages/ColdStartSpeedOptimization.ets +++ b/AppColdStart/entry/src/main/ets/pages/ColdStartSpeedOptimization.ets @@ -14,8 +14,8 @@ */ // [Start cold_start_speed_optimization] -const LARGE_NUMBER = 100000000; -const DELAYED_TIME = 1000; +const LARGE_NUMBER: number = 100000000; +const DELAYED_TIME: number = 1000; @Entry @Component @@ -42,7 +42,7 @@ struct Index { // [EndExclude cold_start_speed_optimization] computeTask(): void { - let count = 0; + let count: number = 0; while (count < LARGE_NUMBER) { count++; } diff --git a/AppColdStart/entry/src/main/ets/pages/ComputeTaskAsync.ets b/AppColdStart/entry/src/main/ets/pages/ComputeTaskAsync.ets index 0278c93ed9cc81ae48da4b036b72b875156ab66d..e8e5d6ff44973b249a2cc9f64e1dc408165d4c6d 100644 --- a/AppColdStart/entry/src/main/ets/pages/ComputeTaskAsync.ets +++ b/AppColdStart/entry/src/main/ets/pages/ComputeTaskAsync.ets @@ -14,8 +14,8 @@ */ // [Start compute_task_async] -const LARGE_NUMBER = 100000000; -const DELAYED_TIME = 1000; +const LARGE_NUMBER: number = 100000000; +const DELAYED_TIME: number = 1000; @Entry @Component @@ -41,7 +41,7 @@ struct Index { } private computeTask(): void { - let count = 0; + let count: number = 0; while (count < LARGE_NUMBER) { count++; } diff --git a/AppColdStart/entry/src/main/ets/pages/ImportOthers.ets b/AppColdStart/entry/src/main/ets/pages/ImportOthers.ets deleted file mode 100644 index b0b5c00aa77edc54885f11c46f7260b9b53f8507..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/src/main/ets/pages/ImportOthers.ets +++ /dev/null @@ -1,37 +0,0 @@ -/* -* Copyright (C) 2025 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 import_others] -import { add } from 'hsp1'; -import { add2 } from 'hsp2'; -import { add3 } from 'hsp3'; -import { add4 } from 'hsp4'; -import { add5 } from 'hsp5'; -import { add6 } from 'hsp6'; -import { add7 } from 'hsp7'; -import { add8 } from 'hsp8'; -import { add9 } from 'hsp9'; -import { add10 } from 'hsp10'; -import { add11 } from 'hsp11'; -import { add12 } from 'hsp12'; -import { add13 } from 'hsp13'; -import { add14 } from 'hsp14'; -import { add15 } from 'hsp15'; -import { add16 } from 'hsp16'; -import { add17 } from 'hsp17'; -import { add18 } from 'hsp18'; -import { add19 } from 'hsp19'; -import { add20 } from 'hsp20' -// [End import_others] \ No newline at end of file diff --git a/AppColdStart/entry/src/main/ets/pages/Index.ets b/AppColdStart/entry/src/main/ets/pages/Index.ets index df1a169956f6364f656643acfef7aa908b92e2f9..aea2e929eba5f67b343912779488de16f3607896 100644 --- a/AppColdStart/entry/src/main/ets/pages/Index.ets +++ b/AppColdStart/entry/src/main/ets/pages/Index.ets @@ -25,15 +25,22 @@ PersistentStorage.persistProp('netData', undefined); @Entry @Component struct Index { - @State message: string = 'Hello World' + number; // In order to reflect the performance benefits, refer to the execution result number of the time-consuming function. + // In order to reflect the performance benefits, refer to the execution result number of the time-consuming function. + @State message: string = 'Hello World' + number; @StorageLink('netData') netData: PixelMap | undefined = undefined; - build(){ - Row(){ + + build() { + Column() { + Text(this.message) + .fontSize(32) Image(this.netData) .objectFit(ImageFit.Contain) .width('50%') .height('50%') } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) .onAppear(() => { // Send a network request httpRequest(); diff --git a/AppColdStart/entry/src/main/ets/pages/ReduceImport.ets b/AppColdStart/entry/src/main/ets/pages/ReduceImport.ets index e178d748e568d06374bb51c0a9fdbdf031844d8b..b241a34b36b59977bd76b9d7ad2ac0174ef06973 100644 --- a/AppColdStart/entry/src/main/ets/pages/ReduceImport.ets +++ b/AppColdStart/entry/src/main/ets/pages/ReduceImport.ets @@ -23,9 +23,7 @@ import { atomicService } from '@kit.ScenarioFusionKit'; import { sim } from '@kit.TelephonyKit';*/ -import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { window } from '@kit.ArkUI'; +import { UIAbility } from '@kit.AbilityKit'; export default class EntryAbility extends UIAbility { diff --git a/AppColdStart/entry/src/main/ets/pages/ScenariosExample.ets b/AppColdStart/entry/src/main/ets/pages/ScenariosExample.ets index 60b87e51515021959ad456f8af93864731d65760..30413c44f31241b3a1dc4ab10175bb5503de44e0 100644 --- a/AppColdStart/entry/src/main/ets/pages/ScenariosExample.ets +++ b/AppColdStart/entry/src/main/ets/pages/ScenariosExample.ets @@ -37,7 +37,7 @@ struct Index { /** * Download picture resources from the Internet through the http request method */ - async getPicture() { + async getPicture(): Promise { http.createHttp() .request('https://www.example1.com/POST?e=f&g=h', (error: BusinessError, data: http.HttpResponse) => { @@ -57,7 +57,7 @@ struct Index { * Use createPixelMap to replace pictures of ArrayBuffer type with PixelMap type * @param data:Resources obtained from the network */ - transcodePixelMap(data: http.HttpResponse) { + transcodePixelMap(data: http.HttpResponse): void { if (http.ResponseCode.OK === data.responseCode) { const imageData: ArrayBuffer = data.result as ArrayBuffer; // Create a picture source instance through ArrayBuffer diff --git a/AppColdStart/entry/src/main/ets/utils/Calculator.ets b/AppColdStart/entry/src/main/ets/utils/Calculator.ets index d41b4edcf2722dbfbc5647edfbc2da8d54447c74..c860a7b90ba84cf11e52adf30c721254fd6c188f 100644 --- a/AppColdStart/entry/src/main/ets/utils/Calculator.ets +++ b/AppColdStart/entry/src/main/ets/utils/Calculator.ets @@ -1,8 +1,9 @@ // [Start request_in_home] // Calculator.ets const LARGE_NUMBER = 100000000; + function computeTask(): number { - let count = 0; + let count: number = 0; while (count < LARGE_NUMBER) { count++; } diff --git a/AppColdStart/entry/src/main/ets/utils/NetRequest.ets b/AppColdStart/entry/src/main/ets/utils/NetRequest.ets index 75a6da13490c36bce8dda37bb2b91a1d72eaa9d1..e5cabcf5e3b3d881f1a23bc95c7a4306b7b58deb 100644 --- a/AppColdStart/entry/src/main/ets/utils/NetRequest.ets +++ b/AppColdStart/entry/src/main/ets/utils/NetRequest.ets @@ -6,10 +6,10 @@ import { http } from '@kit.NetworkKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { image } from '@kit.ImageKit'; // Download picture resources from the Internet through the http request method -export function httpRequest() { +export function httpRequest(): void { hiTraceMeter.startTrace('Http Request', 1); http.createHttp() - // The actual development needs to "https://www.example1.com/POST?e=f&g=h"replaced with the real website address to visit + // The actual development needs to "https://www.example1.com/POST?e=f&g=h"replaced with the real website address to visit .request('https://www.example1.com/POST?e=f&g=h', (error: BusinessError, data: http.HttpResponse) => { if (error) { @@ -23,7 +23,7 @@ export function httpRequest() { } // Use createPixelMap to replace pictures of ArrayBuffer types with PixelMap types. -function transcodePixelMap(data: http.HttpResponse) { +function transcodePixelMap(data: http.HttpResponse): void { if (http.ResponseCode.OK === data.responseCode) { const imageData: ArrayBuffer = data.result as ArrayBuffer; // Create a picture source instance through ArrayBuffer diff --git a/AppColdStart/entry/src/main/module.json5 b/AppColdStart/entry/src/main/module.json5 index a6f47cf23ec2dd840c95c8384da28250b42decd8..3fdd890d2e04fabaffdbaeecec1ef0ff1d397765 100644 --- a/AppColdStart/entry/src/main/module.json5 +++ b/AppColdStart/entry/src/main/module.json5 @@ -16,7 +16,7 @@ "abilities": [ { "name": "EntryAbility", - "srcEntry": "./ets/entryability/EntryAbilityDemo.ets", + "srcEntry": "./ets/entryability/EntryAbility.ets", "description": "$string:EntryAbility_desc", "icon": "$media:layered_image", "label": "$string:EntryAbility_label", diff --git a/AppColdStart/entry/src/main/resources/base/element/float.json b/AppColdStart/entry/src/main/resources/base/element/float.json index 33ea22304f9b1485b5f22d811023701b5d4e35b6..a0a93dd91fd48f08f3a9532c76e9b26e68d4c034 100644 --- a/AppColdStart/entry/src/main/resources/base/element/float.json +++ b/AppColdStart/entry/src/main/resources/base/element/float.json @@ -5,4 +5,4 @@ "value": "50fp" } ] -} +} \ No newline at end of file diff --git a/AppColdStart/entry/src/main/resources/base/profile/main_pages.json b/AppColdStart/entry/src/main/resources/base/profile/main_pages.json index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..55c3f007f87b7ce5206d325f968cc56f2f79441f 100644 --- a/AppColdStart/entry/src/main/resources/base/profile/main_pages.json +++ b/AppColdStart/entry/src/main/resources/base/profile/main_pages.json @@ -2,4 +2,4 @@ "src": [ "pages/Index" ] -} +} \ No newline at end of file diff --git a/AppColdStart/entry/src/mock/mock-config.json5 b/AppColdStart/entry/src/mock/mock-config.json5 deleted file mode 100644 index 7a73a41bfdf76d6f793007240d80983a52f15f97..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/src/mock/mock-config.json5 +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/AppColdStart/entry/src/ohosTest/ets/test/Ability.test.ets b/AppColdStart/entry/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 85c78f67579d6e31b5f5aeea463e216b9b141048..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,35 +0,0 @@ -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }) - }) -} \ No newline at end of file diff --git a/AppColdStart/entry/src/ohosTest/ets/test/List.test.ets b/AppColdStart/entry/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index 794c7dc4ed66bd98fa3865e07922906e2fcef545..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/AppColdStart/entry/src/ohosTest/module.json5 b/AppColdStart/entry/src/ohosTest/module.json5 deleted file mode 100644 index 509a3a28a3e6be8d7f98cc563fa8195657d77d1d..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/src/ohosTest/module.json5 +++ /dev/null @@ -1,11 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "deviceTypes": [ - "phone" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} diff --git a/AppColdStart/entry/src/test/List.test.ets b/AppColdStart/entry/src/test/List.test.ets deleted file mode 100644 index bb5b5c3731e283dd507c847560ee59bde477bbc7..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/src/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/AppColdStart/entry/src/test/LocalUnit.test.ets b/AppColdStart/entry/src/test/LocalUnit.test.ets deleted file mode 100644 index 165fc1615ee8618b4cb6a622f144a9a707eee99f..0000000000000000000000000000000000000000 --- a/AppColdStart/entry/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,33 +0,0 @@ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/library/Index.ets b/AppColdStart/library/Index.ets similarity index 100% rename from AppColdStart/HapAndHarDependHar/library/Index.ets rename to AppColdStart/library/Index.ets diff --git a/AppColdStart/HapAndHarDependHar/library/IndexAppStart.ets b/AppColdStart/library/IndexAppStart.ets similarity index 100% rename from AppColdStart/HapAndHarDependHar/library/IndexAppStart.ets rename to AppColdStart/library/IndexAppStart.ets diff --git a/AppColdStart/HapAndHarDependHar/library/IndexOthers.ets b/AppColdStart/library/IndexOthers.ets similarity index 100% rename from AppColdStart/HapAndHarDependHar/library/IndexOthers.ets rename to AppColdStart/library/IndexOthers.ets diff --git a/AppColdStart/HapAndHarDependHar/har_common/build-profile.json5 b/AppColdStart/library/build-profile.json5 similarity index 100% rename from AppColdStart/HapAndHarDependHar/har_common/build-profile.json5 rename to AppColdStart/library/build-profile.json5 diff --git a/AppColdStart/HapAndHarDependHar/har_common/consumer-rules.txt b/AppColdStart/library/consumer-rules.txt similarity index 100% rename from AppColdStart/HapAndHarDependHar/har_common/consumer-rules.txt rename to AppColdStart/library/consumer-rules.txt diff --git a/AppColdStart/HapAndHarDependHar/har_common/hvigorfile.ts b/AppColdStart/library/hvigorfile.ts similarity index 100% rename from AppColdStart/HapAndHarDependHar/har_common/hvigorfile.ts rename to AppColdStart/library/hvigorfile.ts diff --git a/AppColdStart/HapAndHarDependHar/entry/obfuscation-rules.txt b/AppColdStart/library/obfuscation-rules.txt similarity index 100% rename from AppColdStart/HapAndHarDependHar/entry/obfuscation-rules.txt rename to AppColdStart/library/obfuscation-rules.txt diff --git a/AppColdStart/HapAndHarDependHar/har_common/oh-package.json5 b/AppColdStart/library/oh-package.json5 similarity index 87% rename from AppColdStart/HapAndHarDependHar/har_common/oh-package.json5 rename to AppColdStart/library/oh-package.json5 index c9288aefd5fa8348c6967366470b24384f1b52a0..0651f82cdedfec5fbf293e03a9158fb88cfc40a6 100644 --- a/AppColdStart/HapAndHarDependHar/har_common/oh-package.json5 +++ b/AppColdStart/library/oh-package.json5 @@ -1,5 +1,5 @@ { - "name": "har_common", + "name": "library", "version": "1.0.0", "description": "Please describe the basic information.", "main": "Index.ets", diff --git a/AppColdStart/HapAndHarDependHar/library/src/main/ets/components/mainpage/MainPage.ets b/AppColdStart/library/src/main/ets/components/mainpage/MainPage.ets similarity index 100% rename from AppColdStart/HapAndHarDependHar/library/src/main/ets/components/mainpage/MainPage.ets rename to AppColdStart/library/src/main/ets/components/mainpage/MainPage.ets diff --git a/AppColdStart/HapAndHarDependHar/library/src/main/ets/components/mainpage/SubPage.ets b/AppColdStart/library/src/main/ets/components/mainpage/SubPage.ets similarity index 39% rename from AppColdStart/HapAndHarDependHar/library/src/main/ets/components/mainpage/SubPage.ets rename to AppColdStart/library/src/main/ets/components/mainpage/SubPage.ets index d6a14d7c561252ab05391093ec0b34a71038264c..467a4a8c4e75b2606af614cd215da55200b85e14 100644 --- a/AppColdStart/HapAndHarDependHar/library/src/main/ets/components/mainpage/SubPage.ets +++ b/AppColdStart/library/src/main/ets/components/mainpage/SubPage.ets @@ -1,9 +1,10 @@ // [Start not_recommend_demo] // library/src/main/ets/components/mainpage/SubPage.ets // Global time-consuming functions in SubPage -const LARGE_NUMBER = 10000000; +const LARGE_NUMBER: number = 10000000; + function computeTask(): number { - let count = 0; + let count:number = 0; while (count < LARGE_NUMBER) { count++; } @@ -11,4 +12,19 @@ function computeTask(): number { } let count = computeTask(); // ... -// [End not_recommend_demo] \ No newline at end of file +// [End not_recommend_demo] +@Component +export struct SubPage { + @Consume pathStack: NavPathStack; + @State message: string = 'HAR SubPage'; + + build() { + Row() { + Text(this.message) + .fontSize(32) + .fontWeight(FontWeight.Bold) + }.onClick(() => { + this.pathStack.pushPath({ name: 'SecondPage' }); + }) + } +} \ No newline at end of file diff --git a/AppColdStart/HapAndHarDependHar/har_common/src/main/module.json5 b/AppColdStart/library/src/main/module.json5 similarity index 81% rename from AppColdStart/HapAndHarDependHar/har_common/src/main/module.json5 rename to AppColdStart/library/src/main/module.json5 index b26580cd6a0aa8c7df3ca1fc657f963a1b1b4ef4..dd30f8e0de7154e00da5009b23df656940652a64 100644 --- a/AppColdStart/HapAndHarDependHar/har_common/src/main/module.json5 +++ b/AppColdStart/library/src/main/module.json5 @@ -1,6 +1,6 @@ { "module": { - "name": "har_common", + "name": "library", "type": "har", "deviceTypes": [ "default", diff --git a/AppColdStart/HapAndHarDependHar/har_common/src/main/resources/base/element/string.json b/AppColdStart/library/src/main/resources/base/element/string.json similarity index 100% rename from AppColdStart/HapAndHarDependHar/har_common/src/main/resources/base/element/string.json rename to AppColdStart/library/src/main/resources/base/element/string.json diff --git a/AppColdStart/HapAndHarDependHar/library/src/main/resources/base/element/string.json b/AppColdStart/library/src/main/resources/en_US/element/string.json similarity index 100% rename from AppColdStart/HapAndHarDependHar/library/src/main/resources/base/element/string.json rename to AppColdStart/library/src/main/resources/en_US/element/string.json diff --git a/AppColdStart/HapAndHarDependHar/library/src/main/resources/en_US/element/string.json b/AppColdStart/library/src/main/resources/zh_CN/element/string.json similarity index 100% rename from AppColdStart/HapAndHarDependHar/library/src/main/resources/en_US/element/string.json rename to AppColdStart/library/src/main/resources/zh_CN/element/string.json diff --git a/GesturesConfictPractice/build-profile.json5 b/GesturesConfictPractice/build-profile.json5 index b2ca56e35558b0dc7ca91989b68a1ea65b49a7a2..6e060d8e071b22b3a986264720ffd7e92b4d20aa 100644 --- a/GesturesConfictPractice/build-profile.json5 +++ b/GesturesConfictPractice/build-profile.json5 @@ -1,6 +1,20 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + { + "name": "default", + "type": "HarmonyOS", + "material": { + "certpath": "C:\\Users\\kl\\.ohos\\config\\default_GesturesConfictPractice_KFdURs0XiEcbni4lqvihGLgRTxLgrZwBY9K9w_2bgF4=.cer", + "keyAlias": "debugKey", + "keyPassword": "0000001B98687470C41AD5D2395DCA999D14C0AAD483063F11D9A44283733D9145D8FAB29F7075B9E1C485", + "profile": "C:\\Users\\kl\\.ohos\\config\\default_GesturesConfictPractice_KFdURs0XiEcbni4lqvihGLgRTxLgrZwBY9K9w_2bgF4=.p7b", + "signAlg": "SHA256withECDSA", + "storeFile": "C:\\Users\\kl\\.ohos\\config\\default_GesturesConfictPractice_KFdURs0XiEcbni4lqvihGLgRTxLgrZwBY9K9w_2bgF4=.p12", + "storePassword": "0000001B2E7BF5B01846D1CD2407B30E356F865D761E823FC9734C4605952FCDAEF60A27691C417B37D324" + } + } + ], "products": [ { "name": "default", diff --git a/HapAndHarDependHar/.hvigor/dependencyMap/dependencyMap.json5 b/HapAndHarDependHar/.hvigor/dependencyMap/dependencyMap.json5 index 6191c684f34e99dec105c3e9f59200c85fe9b0a0..956b633bf3016e11b6da6833729dd1e52c1b9456 100644 --- a/HapAndHarDependHar/.hvigor/dependencyMap/dependencyMap.json5 +++ b/HapAndHarDependHar/.hvigor/dependencyMap/dependencyMap.json5 @@ -1 +1 @@ -{"basePath":"C:\\Users\\fy\\Desktop\\newproject\\5.15new10\\BestPracticeSnippets\\HapAndHarDependHar\\.hvigor\\dependencyMap\\dependencyMap.json5","rootDependency":"./oh-package.json5","dependencyMap":{"entry":"./entry/oh-package.json5","har_library":"./har_library/oh-package.json5","har_common":"./har_common/oh-package.json5"},"modules":[{"name":"entry","srcPath":"..\\..\\..\\entry"},{"name":"har_library","srcPath":"..\\..\\..\\har_library"},{"name":"har_common","srcPath":"..\\..\\..\\har_common"}]} \ No newline at end of file +{"basePath":"D:\\toGit\\BestPracticeSnippets\\HapAndHarDependHar\\.hvigor\\dependencyMap\\dependencyMap.json5","rootDependency":"./oh-package.json5","dependencyMap":{"entry":"./entry/oh-package.json5","har_library":"./har_library/oh-package.json5","har_common":"./har_common/oh-package.json5"},"modules":[{"name":"entry","srcPath":"..\\..\\..\\entry"},{"name":"har_library","srcPath":"..\\..\\..\\har_library"},{"name":"har_common","srcPath":"..\\..\\..\\har_common"}]} \ No newline at end of file diff --git a/HapAndHarDependHar/.hvigor/outputs/build-logs/build.log b/HapAndHarDependHar/.hvigor/outputs/build-logs/build.log index 6ba93e9cbcc7d69490968f1654248a2a1abd504c..0169987cdc032c198311a86e9f0664cb096e1829 100644 --- a/HapAndHarDependHar/.hvigor/outputs/build-logs/build.log +++ b/HapAndHarDependHar/.hvigor/outputs/build-logs/build.log @@ -215,3 +215,238 @@ [2025-05-20T17:23:29.393] [DEBUG] debug-file - HapAndHarDependHar : init cost memory 0.00902557373046875 [2025-05-20T17:23:29.394] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 899 ms [2025-05-20T17:23:29.394] [INFO] debug-file - Finished ::init... after 1 ms +[2025-09-19T17:16:10.765] [DEBUG] debug-file - env: nodejsVersion=v18.20.1 +[2025-09-19T17:16:11.143] [DEBUG] debug-file - Hvigor init with startParameters:{ + hvigorfileTypeCheck: false, + parallelExecution: true, + incrementalExecution: true, + printStackTrace: false, + daemon: false, + analyze: 0, + logLevel: Level { level: 20000, levelStr: 'INFO', colour: 'green' }, + optimizationStrategy: 'memory', + hotCompile: undefined, + hotReloadBuild: undefined +} +[2025-09-19T17:16:12.600] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: appTasks], plugins: [] } } +[2025-09-19T17:16:12.770] [DEBUG] debug-file - Start initialize project's product build option map with build mode debug. +[2025-09-19T17:16:12.774] [DEBUG] debug-file - Obtain build option for product 'default'in this build. +[2025-09-19T17:16:12.791] [DEBUG] debug-file - Start recording SDK configuration permission data. +[2025-09-19T17:16:12.828] [DEBUG] debug-file - Project task initialization takes 5 ms +[2025-09-19T17:16:12.850] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=debug +[2025-09-19T17:16:12.859] [DEBUG] debug-file - hvigorfile, resolving D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_library\hvigorfile.ts +[2025-09-19T17:16:12.920] [DEBUG] debug-file - Start to initialize dependency information. +[2025-09-19T17:16:10.766] [DEBUG] debug-file - env: hvigor-config.json5 content = { + modelVersion: '5.0.0', + dependencies: {}, + execution: {}, + logging: {}, + debugging: {}, + nodeOptions: {} +} +[2025-09-19T17:16:12.941] [DEBUG] debug-file - entry : clean cost memory 0.11110687255859375 +[2025-09-19T17:16:11.150] [DEBUG] debug-file - Since current hvigor version 6.0.5 differs from last hvigor version + 5.16.2, delete file-cache.json and task-cache.json. +[2025-09-19T17:16:12.960] [DEBUG] debug-file - Create resident worker with id: 0. +[2025-09-19T17:16:12.600] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: appTasks] +[2025-09-19T17:16:12.770] [DEBUG] debug-file - Picking option from product 'default' with build mode 'debug'. +[2025-09-19T17:16:12.775] [DEBUG] debug-file - not found resModel json file in : D:\toGit\BestPracticeSnippets\HapAndHarDependHar\entry\src\ohosTest\module.json5 +[2025-09-19T17:16:12.822] [DEBUG] debug-file - Sdk init in 38 ms +[2025-09-19T17:16:12.828] [DEBUG] debug-file - hvigorfile, binding custom plugins [] +[2025-09-19T17:16:12.850] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.863] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: harTasks], plugins: [] } } +[2025-09-19T17:16:12.927] [DEBUG] debug-file - Module entry Collected Dependency: D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_library,D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_common +[2025-09-19T17:16:10.768] [DEBUG] debug-file - env: daemon=false +[2025-09-19T17:16:11.151] [DEBUG] debug-file - Cache service initialization finished in 7 ms +[2025-09-19T17:16:12.941] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 804 ms +[2025-09-19T17:16:12.962] [DEBUG] debug-file - Create resident worker with id: 1. +[2025-09-19T17:16:12.770] [DEBUG] debug-file - Product 'default' build option initialized +[2025-09-19T17:16:12.781] [DEBUG] debug-file - not found resModel json file in : D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_library\src\ohosTest\module.json5 +[2025-09-19T17:16:12.828] [DEBUG] debug-file - hvigorfile, no custom plugins were found in D:\toGit\BestPracticeSnippets\HapAndHarDependHar\hvigorfile.ts +[2025-09-19T17:16:12.851] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.927] [DEBUG] debug-file - Module entry's total dependency: 2 +[2025-09-19T17:16:10.768] [DEBUG] debug-file - no-daemon, use the parent process.execArgv --max-old-space-size=8192,--max-semi-space-size=16,--expose-gc +[2025-09-19T17:16:12.964] [DEBUG] debug-file - Current worker pool is stopped or closed. +[2025-09-19T17:16:12.863] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: harTasks] +[2025-09-19T17:16:11.152] [DEBUG] debug-file - hvigorfile, resolving D:\toGit\BestPracticeSnippets\HapAndHarDependHar\hvigorfile.ts +[2025-09-19T17:16:12.942] [INFO] debug-file - Finished :entry:clean... after 2 ms +[2025-09-19T17:16:12.771] [DEBUG] debug-file - End initialize project's product build option map with build mode 'debug'. +[2025-09-19T17:16:12.783] [DEBUG] debug-file - not found resModel json file in : D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_common\src\ohosTest\module.json5 +[2025-09-19T17:16:12.828] [DEBUG] debug-file - hvigorfile, resolve finished D:\toGit\BestPracticeSnippets\HapAndHarDependHar\hvigorfile.ts +[2025-09-19T17:16:12.851] [DEBUG] debug-file - Module 'entry' target 'default' build option initialized +[2025-09-19T17:16:12.931] [DEBUG] debug-file - Start to initialize dependency information. +[2025-09-19T17:16:12.965] [DEBUG] debug-file - Clear worker 0. +[2025-09-19T17:16:12.864] [DEBUG] debug-file - failed to load cangjie to dynamically generate schemas: Error: Cannot find module '@ohos/cangjie-build-support/index' +Require stack: +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\src\plugin\factory\plugin-factory.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\index.js +- D:\toGit\BestPracticeSnippets\HapAndHarDependHar\hvigorfile.ts +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\base\internal\lifecycle\configuration.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\base\boot\index.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\cli\main\cli.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\bin\hvigor.js +[2025-09-19T17:16:12.942] [DEBUG] debug-file - Executing task :har_library:clean +[2025-09-19T17:16:12.784] [DEBUG] debug-file - No signingConfig found, initRemoteHspCache failed. +[2025-09-19T17:16:12.851] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.829] [DEBUG] debug-file - hvigorfile, resolving D:\toGit\BestPracticeSnippets\HapAndHarDependHar\entry\hvigorfile.ts +[2025-09-19T17:16:12.932] [DEBUG] debug-file - Module har_library Collected Dependency: D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_common +[2025-09-19T17:16:12.965] [DEBUG] debug-file - Worker 0 has been cleared. +[2025-09-19T17:16:12.895] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=har_library, buildMode=debug +[2025-09-19T17:16:12.942] [DEBUG] debug-file - clean: Worker pool is inactive. +[2025-09-19T17:16:12.786] [DEBUG] debug-file - Local scan or download HarmonyOS sdk components toolchains,ets,js,native,previewer +[2025-09-19T17:16:12.851] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry +[2025-09-19T17:16:12.835] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: hapTasks], plugins: [] } } +[2025-09-19T17:16:12.932] [DEBUG] debug-file - Module har_library's total dependency: 1 +[2025-09-19T17:16:12.965] [DEBUG] debug-file - Current idle worker size: 1. +[2025-09-19T17:16:12.942] [DEBUG] debug-file - har_library : clean cost memory 0.0296478271484375 +[2025-09-19T17:16:12.895] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.788] [DEBUG] debug-file - Local scan or download hmscore sdk components toolchains,ets,native +[2025-09-19T17:16:12.851] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=release +[2025-09-19T17:16:12.835] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: hapTasks] +[2025-09-19T17:16:12.934] [DEBUG] debug-file - Start to initialize dependency information. +[2025-09-19T17:16:12.965] [DEBUG] debug-file - Current busy worker size: 0. +[2025-09-19T17:16:12.895] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.942] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 806 ms +[2025-09-19T17:16:12.851] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.835] [DEBUG] debug-file - failed to load cangjie to dynamically generate schemas: Error: Cannot find module '@ohos/cangjie-build-support/index' +Require stack: +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\src\plugin\factory\plugin-factory.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\index.js +- D:\toGit\BestPracticeSnippets\HapAndHarDependHar\hvigorfile.ts +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\base\internal\lifecycle\configuration.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\base\boot\index.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\cli\main\cli.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\bin\hvigor.js +[2025-09-19T17:16:12.935] [DEBUG] debug-file - Module har_common Collected Dependency: +[2025-09-19T17:16:12.965] [DEBUG] debug-file - Clear worker 1. +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Module 'har_library' target 'default' build option initialized +[2025-09-19T17:16:12.942] [INFO] debug-file - Finished :har_library:clean... after 1 ms +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.935] [DEBUG] debug-file - Module har_common's total dependency: 0 +[2025-09-19T17:16:12.965] [DEBUG] debug-file - Worker 1 has been cleared. +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Module 'har_library' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.943] [DEBUG] debug-file - Executing task :har_common:clean +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Module 'entry' target 'default' build option initialized +[2025-09-19T17:16:12.936] [DEBUG] debug-file - Configuration phase cost:1 s 785 ms +[2025-09-19T17:16:12.965] [DEBUG] debug-file - Current idle worker size: 0. +[2025-09-19T17:16:12.896] [DEBUG] debug-file - End initialize module-target build option map, moduleName=har_library +[2025-09-19T17:16:12.943] [DEBUG] debug-file - clean: Worker pool is inactive. +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.965] [DEBUG] debug-file - Current busy worker size: 0. +[2025-09-19T17:16:12.939] [DEBUG] debug-file - Configuration task cost before running: 1 s 802 ms +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=har_library, buildMode=release +[2025-09-19T17:16:12.943] [DEBUG] debug-file - har_common : clean cost memory 0.0295257568359375 +[2025-09-19T17:16:12.852] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry +[2025-09-19T17:16:12.965] [DEBUG] debug-file - hvigor build process will be closed. +[2025-09-19T17:16:12.939] [DEBUG] debug-file - Executing task :entry:clean +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.943] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 807 ms +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=debug +[2025-09-19T17:16:12.969] [DEBUG] debug-file - worker[0] exits with exit code 0. +[2025-09-19T17:16:12.939] [DEBUG] debug-file - clean: Worker pool is inactive. +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.943] [INFO] debug-file - Finished :har_common:clean... after 1 ms +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.970] [DEBUG] debug-file - worker[1] exits with exit code 0. +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Module 'har_library' target 'default' build option initialized +[2025-09-19T17:16:12.943] [DEBUG] debug-file - Executing task ::clean +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.972] [DEBUG] debug-file - Current worker pool is terminated. +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Module 'har_library' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.943] [DEBUG] debug-file - clean: Worker pool is inactive. +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Module 'entry' target 'default' build option initialized +[2025-09-19T17:16:12.896] [DEBUG] debug-file - End initialize module-target build option map, moduleName=har_library +[2025-09-19T17:16:12.943] [DEBUG] debug-file - HapAndHarDependHar : clean cost memory 0.020111083984375 +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=har_library, buildMode=debug +[2025-09-19T17:16:12.943] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 807 ms +[2025-09-19T17:16:12.852] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.943] [INFO] debug-file - Finished ::clean... after 1 ms +[2025-09-19T17:16:12.852] [DEBUG] debug-file - Obtain build option for module 'entry' target 'default'in this build. +[2025-09-19T17:16:12.896] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.943] [DEBUG] debug-file - Executing task :entry:init +[2025-09-19T17:16:12.858] [DEBUG] debug-file - Module entry task initialization takes 5 ms +[2025-09-19T17:16:12.897] [DEBUG] debug-file - Module 'har_library' target 'default' build option initialized +[2025-09-19T17:16:12.944] [DEBUG] debug-file - entry : init cost memory 0.0130157470703125 +[2025-09-19T17:16:12.858] [DEBUG] debug-file - hvigorfile, binding custom plugins [] +[2025-09-19T17:16:12.897] [DEBUG] debug-file - Module 'har_library' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.944] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 807 ms +[2025-09-19T17:16:12.858] [DEBUG] debug-file - hvigorfile, no custom plugins were found in D:\toGit\BestPracticeSnippets\HapAndHarDependHar\entry\hvigorfile.ts +[2025-09-19T17:16:12.897] [DEBUG] debug-file - End initialize module-target build option map, moduleName=har_library +[2025-09-19T17:16:12.944] [INFO] debug-file - Finished :entry:init... after 1 ms +[2025-09-19T17:16:12.858] [DEBUG] debug-file - hvigorfile, resolve finished D:\toGit\BestPracticeSnippets\HapAndHarDependHar\entry\hvigorfile.ts +[2025-09-19T17:16:12.897] [DEBUG] debug-file - Obtain build option for module 'har_library' target 'default'in this build. +[2025-09-19T17:16:12.944] [DEBUG] debug-file - Executing task :har_library:init +[2025-09-19T17:16:12.898] [DEBUG] debug-file - Module har_library task initialization takes 2 ms +[2025-09-19T17:16:12.944] [DEBUG] debug-file - har_library : init cost memory 0.01064300537109375 +[2025-09-19T17:16:12.898] [DEBUG] debug-file - hvigorfile, binding custom plugins [] +[2025-09-19T17:16:12.944] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 808 ms +[2025-09-19T17:16:12.898] [DEBUG] debug-file - hvigorfile, no custom plugins were found in D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_library\hvigorfile.ts +[2025-09-19T17:16:12.944] [INFO] debug-file - Finished :har_library:init... after 1 ms +[2025-09-19T17:16:12.898] [DEBUG] debug-file - hvigorfile, resolve finished D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_library\hvigorfile.ts +[2025-09-19T17:16:12.944] [DEBUG] debug-file - Executing task :har_common:init +[2025-09-19T17:16:12.899] [DEBUG] debug-file - hvigorfile, resolving D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_common\hvigorfile.ts +[2025-09-19T17:16:12.944] [DEBUG] debug-file - har_common : init cost memory 0.01055908203125 +[2025-09-19T17:16:12.902] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: harTasks], plugins: [] } } +[2025-09-19T17:16:12.944] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 808 ms +[2025-09-19T17:16:12.902] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: harTasks] +[2025-09-19T17:16:12.944] [INFO] debug-file - Finished :har_common:init... after 1 ms +[2025-09-19T17:16:12.903] [DEBUG] debug-file - failed to load cangjie to dynamically generate schemas: Error: Cannot find module '@ohos/cangjie-build-support/index' +Require stack: +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\src\plugin\factory\plugin-factory.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\index.js +- D:\toGit\BestPracticeSnippets\HapAndHarDependHar\hvigorfile.ts +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\base\internal\lifecycle\configuration.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\base\boot\index.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\src\cli\main\cli.js +- D:\Program Files\Huawei\DevEco Studio\tools\hvigor\hvigor\bin\hvigor.js +[2025-09-19T17:16:12.945] [DEBUG] debug-file - Executing task ::init +[2025-09-19T17:16:12.904] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=har_common, buildMode=debug +[2025-09-19T17:16:12.945] [DEBUG] debug-file - HapAndHarDependHar : init cost memory 0.0115966796875 +[2025-09-19T17:16:12.904] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.945] [DEBUG] debug-file - runTaskFromQueue task cost before running: 1 s 808 ms +[2025-09-19T17:16:12.904] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.945] [INFO] debug-file - Finished ::init... after 1 ms +[2025-09-19T17:16:12.904] [DEBUG] debug-file - Module 'har_common' target 'default' build option initialized +[2025-09-19T17:16:12.951] [DEBUG] debug-file - Obtain build option for module 'entry' target 'default'in this build. +[2025-09-19T17:16:12.904] [DEBUG] debug-file - Module 'har_common' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.951] [DEBUG] debug-file - Obtain build option for module 'entry' target 'ohosTest'in this build. +[2025-09-19T17:16:12.904] [DEBUG] debug-file - End initialize module-target build option map, moduleName=har_common +[2025-09-19T17:16:12.952] [DEBUG] debug-file - Obtain build option for module 'har_library' target 'default'in this build. +[2025-09-19T17:16:12.904] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=har_common, buildMode=release +[2025-09-19T17:16:12.952] [DEBUG] debug-file - Obtain build option for module 'har_library' target 'ohosTest'in this build. +[2025-09-19T17:16:12.904] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.952] [DEBUG] debug-file - Obtain build option for module 'har_common' target 'default'in this build. +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.953] [DEBUG] debug-file - Obtain build option for module 'har_common' target 'ohosTest'in this build. +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Module 'har_common' target 'default' build option initialized +[2025-09-19T17:16:12.958] [DEBUG] debug-file - Since there is no instance or instance is terminated, create a new worker pool. +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Module 'har_common' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.958] [DEBUG] debug-file - Worker pool is initialized with config: { + minPoolNum: 2, + maxPoolNum: undefined, + maxCoreSize: undefined, + cacheCapacity: undefined, + cacheTtl: undefined +} +[2025-09-19T17:16:12.907] [DEBUG] debug-file - End initialize module-target build option map, moduleName=har_common +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=har_common, buildMode=debug +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Target 'default' config initialized +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Target 'ohosTest' config initialized +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Module 'har_common' target 'default' build option initialized +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Module 'har_common' target 'ohosTest' build option initialized +[2025-09-19T17:16:12.907] [DEBUG] debug-file - End initialize module-target build option map, moduleName=har_common +[2025-09-19T17:16:12.907] [DEBUG] debug-file - Obtain build option for module 'har_common' target 'default'in this build. +[2025-09-19T17:16:12.908] [DEBUG] debug-file - Module har_common task initialization takes 1 ms +[2025-09-19T17:16:12.908] [DEBUG] debug-file - hvigorfile, binding custom plugins [] +[2025-09-19T17:16:12.908] [DEBUG] debug-file - hvigorfile, no custom plugins were found in D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_common\hvigorfile.ts +[2025-09-19T17:16:12.908] [DEBUG] debug-file - hvigorfile, resolve finished D:\toGit\BestPracticeSnippets\HapAndHarDependHar\har_common\hvigorfile.ts +[2025-09-19T17:16:12.908] [DEBUG] debug-file - project has submodules:entry,har_library,har_common +[2025-09-19T17:16:12.909] [DEBUG] debug-file - module:har_library no need to execute packageHap +[2025-09-19T17:16:12.909] [DEBUG] debug-file - module:har_common no need to execute packageHap +[2025-09-19T17:16:12.911] [DEBUG] debug-file - start to load updatedOhPackageInfo to the disk +[2025-09-19T17:16:12.916] [DEBUG] debug-file - load to the disk finished +[2025-09-19T17:16:12.917] [DEBUG] debug-file - Start to initialize dependency information. +[2025-09-19T17:16:12.919] [DEBUG] debug-file - Module HapAndHarDependHar Collected Dependency: +[2025-09-19T17:16:12.919] [DEBUG] debug-file - Module HapAndHarDependHar's total dependency: 0 diff --git a/HapAndHarDependHar/entry/oh_modules/har_common/obfuscation-rules.txt b/HapAndHarDependHar/entry/oh_modules/har_common/obfuscation-rules.txt index 985b2aeb7658286b17bd26eab8f217c3fe75ea8b..a1dfa0bd175984dc49e641436aa67b1de1b8abeb 100644 --- a/HapAndHarDependHar/entry/oh_modules/har_common/obfuscation-rules.txt +++ b/HapAndHarDependHar/entry/oh_modules/har_common/obfuscation-rules.txt @@ -15,4 +15,8 @@ # Keep options: # -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope \ No newline at end of file +# -keep-global-name: specifies names that you want to keep in the global scope +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/HapAndHarDependHar/entry/oh_modules/har_library/obfuscation-rules.txt b/HapAndHarDependHar/entry/oh_modules/har_library/obfuscation-rules.txt index 985b2aeb7658286b17bd26eab8f217c3fe75ea8b..a1dfa0bd175984dc49e641436aa67b1de1b8abeb 100644 --- a/HapAndHarDependHar/entry/oh_modules/har_library/obfuscation-rules.txt +++ b/HapAndHarDependHar/entry/oh_modules/har_library/obfuscation-rules.txt @@ -15,4 +15,8 @@ # Keep options: # -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope \ No newline at end of file +# -keep-global-name: specifies names that you want to keep in the global scope +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/HapAndHarDependHar/entry/oh_modules/har_library/oh_modules/har_common/obfuscation-rules.txt b/HapAndHarDependHar/entry/oh_modules/har_library/oh_modules/har_common/obfuscation-rules.txt index 985b2aeb7658286b17bd26eab8f217c3fe75ea8b..a1dfa0bd175984dc49e641436aa67b1de1b8abeb 100644 --- a/HapAndHarDependHar/entry/oh_modules/har_library/oh_modules/har_common/obfuscation-rules.txt +++ b/HapAndHarDependHar/entry/oh_modules/har_library/oh_modules/har_common/obfuscation-rules.txt @@ -15,4 +15,8 @@ # Keep options: # -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope \ No newline at end of file +# -keep-global-name: specifies names that you want to keep in the global scope +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/HapAndHarDependHar/har_library/oh_modules/har_common/obfuscation-rules.txt b/HapAndHarDependHar/har_library/oh_modules/har_common/obfuscation-rules.txt index 985b2aeb7658286b17bd26eab8f217c3fe75ea8b..a1dfa0bd175984dc49e641436aa67b1de1b8abeb 100644 --- a/HapAndHarDependHar/har_library/oh_modules/har_common/obfuscation-rules.txt +++ b/HapAndHarDependHar/har_library/oh_modules/har_common/obfuscation-rules.txt @@ -15,4 +15,8 @@ # Keep options: # -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope \ No newline at end of file +# -keep-global-name: specifies names that you want to keep in the global scope +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file