diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/app.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/app.json deleted file mode 100755 index 2afc733880dbb67815c288b54f38a0f0d8907d45..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "app": { - "apiReleaseType": "Release", - "bundleName": "com.example.dependenciestest", - "debug": true, - "icon": "$media:app_icon", - "iconId": 16777217, - "label": "$string:app_name", - "labelId": 16777216, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0" - } -} diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/app.json5 b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..f31b6106280db7290472551c8a113fbe8fcfa492 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/app.json5 @@ -0,0 +1,14 @@ +{ + "app": { + "apiReleaseType": "Release1", + "bundleName": "com.example.dependenciestest", + "debug": true, + "icon": "$media:app_icon", + "label": "$string:app_name", + "minAPIVersion": 9, + "targetAPIVersion": 9, + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0" + } +} diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/element/string.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/element/string.json old mode 100755 new mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..df6e089e77e2146e2b7f982851ea34995a515ba4 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/element/string.json +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/element/string.json @@ -1,8 +1,8 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file +{ + "string": [ + { + "name": "app_name", + "value": "com.example.dependenciestest" + } + ] +} diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_background.png b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_background.png differ diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_foreground.png b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_foreground.png differ diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/app_icon.png b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_icon.png old mode 100755 new mode 100644 similarity index 100% rename from test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/app_icon.png rename to test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_icon.png diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_layered_image.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..b71c16122943f248ace0f5fa26da38b71dbdbdde --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/AppScope/resources/base/media/app_layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:app_background", + "foreground" : "$media:app_foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/BUILD.gn b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/BUILD.gn index 7a647d8d4dceaf38ab088336189f43a242518893..d8cc8981ad96f7a6d12d1ef20d00c82e6f73d1d0 100755 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/BUILD.gn +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-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 @@ -14,30 +14,16 @@ import("//build/ohos.gni") import("../../../../../appexecfwk.gni") -ohos_hap("dependencies_entry_C") { - hap_profile = "entry/src/main/module.json" +ohos_app("dependencies_entry_C") { hap_name = "dependencies_entry_C" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/unittest/bundle_framework/bundle_framework/resource/bundle_dependencies/${hap_name}.hap" + hap_out_dir = "$root_out_dir/tests/unittest/bundle_framework/bundle_framework/resource/bundle_dependencies" testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.dependenciestest.p7b" -} - -ohos_app_scope("bmsstagedemoone_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("hjs_demo_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":bmsstagedemoone_app_profile" ] - hap_profile = "entry/src/main/module.json" + js_build_mode = "release" + sdk_home = "//prebuilts/ohos-sdk/linux" + sdk_type_name = [ "sdk.dir" ] + assemble_type = "assembleHap" + build_level = "module" + build_modules = [ "module01" ] } diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/build-profile.json5 b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..dfb34f7b9ee6d4be47467380bc43fb8019f98e17 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/GlobalContext.ts b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/GlobalContext.ts deleted file mode 100644 index 0a0a885f3e2610c79645c247880b0675dc905ad8..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/GlobalContext.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2023 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 {Core} from "deccjsunit/index.ets" -import testsuite from "../../test/List.test.ets" - -export default class GlobalContext { - constructor(){ - } - globalContext(core:Core) { - const configService = core.getDefaultService('config') - console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters)) - globalThis.abilityWant.parameters.timeout = 70000; - configService.setConfig(globalThis.abilityWant.parameters) - testsuite(globalThis.abilityContext) - } -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/MainAbility.ets b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/MainAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..b12b706076bc833e0f1c073e99881ef3b3a84004 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/MainAbility.ets @@ -0,0 +1,44 @@ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/MainAbility.ts b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100755 index 2c4b0fda0f2c9755cab78a48e417f4c22b47f6a1..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2022 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 Ability from '@ohos.app.ability.UIAbility' - -export default class MainAbility extends Ability { - onCreate(want,launchParam){ - // Ability is creating, initialize resources for this ability - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "pages/index/index", null) - } - - onWindowStageDestroy() { - //Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..fae19f9dd53d2857e2843539cbedf5bee4a34b5a --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,16 @@ +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +const DOMAIN = 0x0000; + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(DOMAIN, 'testTag', 'onBackup ok'); + await Promise.resolve(); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + await Promise.resolve(); + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/second/second.ets b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/Index.ets old mode 100755 new mode 100644 similarity index 71% rename from test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/second/second.ets rename to test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/Index.ets index f9009a3e8567d1f4557ebc11dded54c7e27c0b0d..cc0821ac23ea0b1644cb1d74baf4a72cbe761f24 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/second/second.ets +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/Index.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2023-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 @@ -12,21 +12,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import router from '@system.router'; +import file from '@system.file'; @Entry @Component -struct Second { - private content: string = "Second Page" +struct Index { + aboutToAppear(){ + console.info("start run testcase!!!!") + } build() { - Flex({ direction: FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text(`${this.content}`) + Flex({ direction:FlexDirection.Column, alignItems:ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('Hello World') .fontSize(50) .fontWeight(FontWeight.Bold) Button() { - Text('back to index') - .fontSize(20) + Text('next page') + .fontSize(25) .fontWeight(FontWeight.Bold) }.type(ButtonType.Capsule) .margin({ @@ -34,7 +36,7 @@ struct Second { }) .backgroundColor('#0D9FFB') .onClick(() => { - router.back() + }) } .width('100%') diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/Second.ets b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/Second.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa8c5955b4ac31310ba4a3ee25b25a2a458f1dd1 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/Second.ets @@ -0,0 +1,29 @@ +import router from '@system.router'; + +@Entry +@Component +struct Second { + private content: string = "Second Page" + + build() { + Flex({ direction: FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('back to index') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .onClick(() => { + router.back() + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/index/index.ets b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/index/index.ets deleted file mode 100755 index 26c5c0ffd1a38336960d32d88382bbb2d767ad7b..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2022-2023 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 file from '@system.file'; - -import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets" -import GlobalContext from "../MainAbility/GlobalContext.ts" - - -@Entry -@Component -struct Index { - aboutToAppear(){ - console.info("start run testcase!!!!") - const core:Core = Core.getInstance() - const expectExtend:ExpectExtend = new ExpectExtend({ - id: 'extend' - }) - core.addService('expect', expectExtend) - const reportExtend:ReportExtend = new ReportExtend(file) - - core.addService('report', reportExtend) - core.init() - core.subscribeEvent('task', reportExtend) - - const globalContext:GlobalContext = new GlobalContext() - globalContext.globalContext(core) - core.execute() - } - - build() { - Flex({ direction:FlexDirection.Column, alignItems:ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('Hello World') - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(25) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .onClick(() => { - - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/test/List.test.ets b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/test/List.test.ets deleted file mode 100755 index 6a09b8863babb1b8d77d3257fd7cd7d42266cee4..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2022-2023 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 default function testsuite(context:Context) { -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/hvigorfile.ts b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..b0e3a1ab98a91bc918d6404b2413111a5011f14a --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/hvigorfile.ts @@ -0,0 +1,6 @@ +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. */ +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/module.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/module.json deleted file mode 100755 index d7e71030b8df3effa53235e0db53f4c6178c3eff..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/module.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "module": { - "abilities": [ - { - "description": "$string:MainAbility_desc", - "descriptionId": 16777218, - "icon": "$media:icon", - "iconId": 16777221, - "label": "$string:MainAbility_label", - "labelId": 16777219, - "name": "MainAbility", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ], - "srcEntry": "./ets/MainAbility/MainAbility.ts", - "exported": true - } - ], - "deliveryWithInstall": true, - "dependencies": [], - "description": "$string:entry_desc", - "descriptionId": 16777220, - "deviceTypes": [ - "2in1", - "tablet", - "default" - ], - "installationFree": false, - "mainElement": "MainAbility", - "name": "entry_C", - "pages": "$profile:main_pages", - "srcEntry": "./ets/Application/AbilityStage.ts", - "type": "feature", - "virtualMachine": "ark" - } -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/module.json5 b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..1540695f29b59570ad3e7164830a0e752fdbe263 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/module.json5 @@ -0,0 +1,41 @@ +{ + "module": { + "abilities": [ + { + "description": "$string:MainAbility_desc", + "icon": "$media:icon", + "label": "$string:MainAbility_label", + "name": "MainAbility", + "skills": [ + { + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + } + ], + "srcEntry": "./ets/MainAbility/MainAbility.ets", + "exported": true, + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background" + } + ], + "deliveryWithInstall": true, + "dependencies": [], + "description": "$string:entry_desc", + "deviceTypes": [ + "2in1", + "tablet", + "default" + ], + "installationFree": false, + "mainElement": "MainAbility", + "name": "entry_C", + "pages": "$profile:main_pages", + "srcEntry": "./ets/MainAbility/MainAbility.ets", + "type": "feature", + "virtualMachine": "ark" + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/obfuscation-rules.txt b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# 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://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# 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 + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/oh-package.json5 b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..2959d78c50285f912adb2cdff9f613df9a503b44 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/oh-package.json5 @@ -0,0 +1,10 @@ +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/color.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/color.json old mode 100755 new mode 100644 index da3f48e2475c66fad5b23feb535379244be849cf..d072d67ed49eb14191342d28b3c8717f5d988bfa --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/color.json +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/color.json @@ -1,8 +1,8 @@ -{ - "color": [ - { - "name": "icon", - "value": "#99999999" - } - ] -} +{ + "color": [ + { + "name": "icon", + "value": "#99999999" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/float.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..a8a5d404dcd8b0466194afc3aa25d90a8a327470 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/string.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/string.json old mode 100755 new mode 100644 index ad1320cfdd6853e74f0e58c57bb14b623d454974..3dfe92041999060ccd6354589c1313f48bfe37e8 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/string.json +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/element/string.json @@ -1,40 +1,40 @@ { - "string": [ - { - "name": "entry_desc", - "value": "entry_desc" - }, - { - "name": "phone_entry_main", - "value": "the phone entry ability" - }, - { - "name": "entry_label", - "value": "entry_label" - }, - { - "name": "form_description", - "value": "my form" - }, - { - "name": "MainAbility_desc", - "value": "MainAbility_desc" - }, - { - "name": "app_name", - "value": "Demo" - }, - { - "name": "MainAbility_label", - "value": "form_label" - }, - { - "name": "16777223", - "value": "form_label" - }, - { - "name": "16777219", - "value": "form_label" - } - ] -} + "string": [ + { + "name": "entry_desc", + "value": "entry_desc" + }, + { + "name": "phone_entry_main", + "value": "the phone entry ability" + }, + { + "name": "entry_label", + "value": "entry_label" + }, + { + "name": "form_description", + "value": "my form" + }, + { + "name": "MainAbility_desc", + "value": "MainAbility_desc" + }, + { + "name": "app_name", + "value": "Demo" + }, + { + "name": "MainAbility_label", + "value": "form_label" + }, + { + "name": "16777223", + "value": "form_label" + }, + { + "name": "16777219", + "value": "form_label" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/aa_icon.png b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/aa_icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/aa_icon.png and /dev/null differ diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/background.png b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/background.png differ diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/foreground.png b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/foreground.png differ diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/icon.png b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/icon.png old mode 100755 new mode 100644 diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/layered_image.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/startIcon.png b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/media/startIcon.png differ diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/backup_config.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config.json deleted file mode 100755 index 1fa99370178bc4bb5e34f076a6a85e581b24bdb3..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "forms": [ - { - "colorMode": "auto", - "defaultDimension": "2*2", - "description": "$string:16777219", - "formConfigAbility": "ability://xxxxx", - "formVisibleNotify": false, - "isDefault": true, - "name": "Form_Js", - "scheduledUpdateTime": "10:30", - "src": "pages/card/index", - "supportDimensions": [ - "2*2" - ], - "updateDuration": 1, - "updateEnabled": true, - "window": { - "autoDesignWidth": true, - "designWidth": 720 - } - } - ] -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config1.txt b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config1.txt deleted file mode 100755 index cd78c7df6b8809db4d3a5c03bedcb088737cfa48..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config1.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ - "forms":[ - { - "colorMode":"auto", - "defaultDimension":"2*2", - "description":"$string:16777219", - "formConfigAbility":"ability://xxxxx", - "formVisibleNotify":false, - "isDefault":true, - "name":"Form_Js", - "scheduledUpdateTime":"10:30", - "src":"pages/card/index", - "supportDimensions":[ - "2*2" - ], - "updateDuration":1, - "updateEnabled":true, - "window":{ - "autoDesignWidth":true, - "designWidth":720 - } - } - ] -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config3.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config3.json deleted file mode 100755 index 1fa99370178bc4bb5e34f076a6a85e581b24bdb3..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/form_config3.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "forms": [ - { - "colorMode": "auto", - "defaultDimension": "2*2", - "description": "$string:16777219", - "formConfigAbility": "ability://xxxxx", - "formVisibleNotify": false, - "isDefault": true, - "name": "Form_Js", - "scheduledUpdateTime": "10:30", - "src": "pages/card/index", - "supportDimensions": [ - "2*2" - ], - "updateDuration": 1, - "updateEnabled": true, - "window": { - "autoDesignWidth": true, - "designWidth": 720 - } - } - ] -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/main_pages.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/main_pages.json old mode 100755 new mode 100644 index 96b478210df9884592229ae2db6f6bb7f86c14f4..8a054276dcbbd5f9028b0d2e4dc133b7f43acb26 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/main_pages.json +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/main_pages.json @@ -1,6 +1,6 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] +{ + "src": [ + "pages/Index", + "pages/Second" + ] } \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/shortcuts_config.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/shortcuts_config.json deleted file mode 100755 index a19bdd92533a8f9b7aa320be20fd775befac60d2..0000000000000000000000000000000000000000 --- a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/base/profile/shortcuts_config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "shortcuts": [ - { - "icon": "$media:icon", - "label": "$string:16777223", - "shortcutId": "id_test1", - "wants": [ - { - "abilityName": "MainAbility001", - "bundleName": "com.ohos.hello" - }, - { - "abilityName": "MainAbility002", - "bundleName": "com.ohos.world" - } - ] - }, - { - "icon": "icon002", - "label": "label002", - "shortcutId": "id002", - "wants": [ - { - "abilityName": "MainAbility001", - "bundleName": "com.ohos.hello" - }, - { - "abilityName": "MainAbility002", - "bundleName": "com.ohos.world" - } - ] - } - ] -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/dark/element/color.json b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/hvigor/hvigor-config.json5 b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..c2cebe31b3975347f76419f7946ac60eff3d8258 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/hvigor/hvigor-config.json5 @@ -0,0 +1,22 @@ +{ + "modelVersion": "5.1.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/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/hvigorfile.ts b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..47113e2e36ecefde41c136272a0bd6ff745cffe4 --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/hvigorfile.ts @@ -0,0 +1,6 @@ +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. */ +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/oh-package-lock.json5 b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/oh-package-lock.json5 new file mode 100644 index 0000000000000000000000000000000000000000..8917c2bff6aec400d8d43f7898795a0c22265afe --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/oh-package-lock.json5 @@ -0,0 +1,28 @@ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.21": "@ohos/hypium@1.0.21" + }, + "packages": { + "@ohos/hamock@1.0.0": { + "name": "@ohos/hamock", + "version": "1.0.0", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "registryType": "ohpm" + }, + "@ohos/hypium@1.0.21": { + "name": "@ohos/hypium", + "version": "1.0.21", + "integrity": "sha512-iyKGMXxE+9PpCkqEwu0VykN/7hNpb+QOeIuHwkmZnxOpI+dFZt6yhPB7k89EgV1MiSK/ieV/hMjr5Z2mWwRfMQ==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.21.har", + "registryType": "ohpm" + } + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/oh-package.json5 b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..ad660aa2d7acd1af48a4560f7d1a045326c7967b --- /dev/null +++ b/test/sceneProject/unittest/bundle_dependencies/dependencies_entry_C/oh-package.json5 @@ -0,0 +1,10 @@ +{ + "modelVersion": "5.1.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21", + "@ohos/hamock": "1.0.0" + } +}