diff --git a/build-profile.json5 b/build-profile.json5 index 0cb46cc..709912b 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -37,6 +37,30 @@ ] } ] + }, + { + "name": "contracts", + "srcPath": "./contracts" + }, + { + "name": "common", + "srcPath": "./common" + }, + { + "name": "platform", + "srcPath": "./platform" + }, + { + "name": "domain_resource", + "srcPath": "./domain_resource" + }, + { + "name": "feature_bridge", + "srcPath": "./feature_bridge" + }, + { + "name": "feature_capabilities", + "srcPath": "./feature_capabilities" } ] } \ No newline at end of file diff --git a/common/.gitignore b/common/.gitignore new file mode 100644 index 0000000..36cebc0 --- /dev/null +++ b/common/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test diff --git a/common/BuildProfile.ets b/common/BuildProfile.ets new file mode 100644 index 0000000..3a501e5 --- /dev/null +++ b/common/BuildProfile.ets @@ -0,0 +1,17 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const HAR_VERSION = '1.0.0'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; +export const TARGET_NAME = 'default'; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly HAR_VERSION = HAR_VERSION; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; + static readonly TARGET_NAME = TARGET_NAME; +} \ No newline at end of file diff --git a/common/Index.ets b/common/Index.ets new file mode 100644 index 0000000..8475c22 --- /dev/null +++ b/common/Index.ets @@ -0,0 +1,3 @@ +// common HAR —— 横切基础设施(导出入口 SSOT) +// 各子模块实现完成后在此统一 export。占位常量确保 HAR 可编译。 +export const common_MODULE_VERSION: string = '1.0.0'; diff --git a/common/build-profile.json5 b/common/build-profile.json5 new file mode 100644 index 0000000..5432de6 --- /dev/null +++ b/common/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": true, + "files": [ + "./obfuscation-rules.txt" + ] + }, + "consumerFiles": [ + "./consumer-rules.txt" + ] + } + } + } + ], + "targets": [ + { + "name": "default" + } + ] +} diff --git a/common/consumer-rules.txt b/common/consumer-rules.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/common/consumer-rules.txt @@ -0,0 +1 @@ + diff --git a/common/hvigorfile.ts b/common/hvigorfile.ts new file mode 100644 index 0000000..08f99a1 --- /dev/null +++ b/common/hvigorfile.ts @@ -0,0 +1,6 @@ +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/common/obfuscation-rules.txt b/common/obfuscation-rules.txt new file mode 100644 index 0000000..f5b5c78 --- /dev/null +++ b/common/obfuscation-rules.txt @@ -0,0 +1,3 @@ +# Obfuscation rules for this HAR module. +# See https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/source-obfuscation +-disable-obfuscation diff --git a/common/oh-package-lock.json5 b/common/oh-package-lock.json5 new file mode 100644 index 0000000..d965f76 --- /dev/null +++ b/common/oh-package-lock.json5 @@ -0,0 +1,19 @@ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "contracts@../contracts": "contracts@../contracts" + }, + "packages": { + "contracts@../contracts": { + "name": "contracts", + "version": "1.0.0", + "resolved": "../contracts", + "registryType": "local" + } + } +} \ No newline at end of file diff --git a/common/oh-package.json5 b/common/oh-package.json5 new file mode 100644 index 0000000..9c89ef8 --- /dev/null +++ b/common/oh-package.json5 @@ -0,0 +1,11 @@ +{ + "name": "common", + "version": "1.0.0", + "description": "横切基础设施:Logger/Tracer/EventBus/DIContainer/ErrorCenter", + "main": "Index.ets", + "author": "", + "license": "Apache-2.0", + "dependencies": { + "contracts": "file:../contracts" + } +} diff --git a/common/src/main/module.json5 b/common/src/main/module.json5 new file mode 100644 index 0000000..b0a3620 --- /dev/null +++ b/common/src/main/module.json5 @@ -0,0 +1,9 @@ +{ + "module": { + "name": "common", + "type": "har", + "deviceTypes": [ + "phone" + ] + } +} diff --git a/common/src/main/resources/base/element/string.json b/common/src/main/resources/base/element/string.json new file mode 100644 index 0000000..2aa0316 --- /dev/null +++ b/common/src/main/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "common_desc", + "value": "common module" + } + ] +} diff --git a/contracts/.gitignore b/contracts/.gitignore new file mode 100644 index 0000000..36cebc0 --- /dev/null +++ b/contracts/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test diff --git a/contracts/BuildProfile.ets b/contracts/BuildProfile.ets new file mode 100644 index 0000000..3a501e5 --- /dev/null +++ b/contracts/BuildProfile.ets @@ -0,0 +1,17 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const HAR_VERSION = '1.0.0'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; +export const TARGET_NAME = 'default'; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly HAR_VERSION = HAR_VERSION; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; + static readonly TARGET_NAME = TARGET_NAME; +} \ No newline at end of file diff --git a/contracts/Index.ets b/contracts/Index.ets new file mode 100644 index 0000000..c358aa8 --- /dev/null +++ b/contracts/Index.ets @@ -0,0 +1,3 @@ +// contracts HAR —— 契约类型 SSOT(导出入口 SSOT) +// 各子模块实现完成后在此统一 export。占位常量确保 HAR 可编译。 +export const contracts_MODULE_VERSION: string = '1.0.0'; diff --git a/contracts/build-profile.json5 b/contracts/build-profile.json5 new file mode 100644 index 0000000..5432de6 --- /dev/null +++ b/contracts/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": true, + "files": [ + "./obfuscation-rules.txt" + ] + }, + "consumerFiles": [ + "./consumer-rules.txt" + ] + } + } + } + ], + "targets": [ + { + "name": "default" + } + ] +} diff --git a/contracts/consumer-rules.txt b/contracts/consumer-rules.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/contracts/consumer-rules.txt @@ -0,0 +1 @@ + diff --git a/contracts/hvigorfile.ts b/contracts/hvigorfile.ts new file mode 100644 index 0000000..08f99a1 --- /dev/null +++ b/contracts/hvigorfile.ts @@ -0,0 +1,6 @@ +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/contracts/obfuscation-rules.txt b/contracts/obfuscation-rules.txt new file mode 100644 index 0000000..f5b5c78 --- /dev/null +++ b/contracts/obfuscation-rules.txt @@ -0,0 +1,3 @@ +# Obfuscation rules for this HAR module. +# See https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/source-obfuscation +-disable-obfuscation diff --git a/contracts/oh-package.json5 b/contracts/oh-package.json5 new file mode 100644 index 0000000..b1e0d96 --- /dev/null +++ b/contracts/oh-package.json5 @@ -0,0 +1,10 @@ +{ + "name": "contracts", + "version": "1.0.0", + "description": "契约类型 SSOT:handler 名、DTO、Result、Errors(全工程唯一来源)", + "main": "Index.ets", + "author": "", + "license": "Apache-2.0", + "dependencies": { + } +} diff --git a/contracts/src/main/module.json5 b/contracts/src/main/module.json5 new file mode 100644 index 0000000..233a0ea --- /dev/null +++ b/contracts/src/main/module.json5 @@ -0,0 +1,9 @@ +{ + "module": { + "name": "contracts", + "type": "har", + "deviceTypes": [ + "phone" + ] + } +} diff --git a/contracts/src/main/resources/base/element/string.json b/contracts/src/main/resources/base/element/string.json new file mode 100644 index 0000000..db09390 --- /dev/null +++ b/contracts/src/main/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "contracts_desc", + "value": "contracts module" + } + ] +} diff --git a/domain_resource/.gitignore b/domain_resource/.gitignore new file mode 100644 index 0000000..36cebc0 --- /dev/null +++ b/domain_resource/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test diff --git a/domain_resource/BuildProfile.ets b/domain_resource/BuildProfile.ets new file mode 100644 index 0000000..3a501e5 --- /dev/null +++ b/domain_resource/BuildProfile.ets @@ -0,0 +1,17 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const HAR_VERSION = '1.0.0'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; +export const TARGET_NAME = 'default'; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly HAR_VERSION = HAR_VERSION; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; + static readonly TARGET_NAME = TARGET_NAME; +} \ No newline at end of file diff --git a/domain_resource/Index.ets b/domain_resource/Index.ets new file mode 100644 index 0000000..d37f7d2 --- /dev/null +++ b/domain_resource/Index.ets @@ -0,0 +1,3 @@ +// domain_resource HAR —— 领域服务层(导出入口 SSOT) +// 各子模块实现完成后在此统一 export。占位常量确保 HAR 可编译。 +export const domain_resource_MODULE_VERSION: string = '1.0.0'; diff --git a/domain_resource/build-profile.json5 b/domain_resource/build-profile.json5 new file mode 100644 index 0000000..5432de6 --- /dev/null +++ b/domain_resource/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": true, + "files": [ + "./obfuscation-rules.txt" + ] + }, + "consumerFiles": [ + "./consumer-rules.txt" + ] + } + } + } + ], + "targets": [ + { + "name": "default" + } + ] +} diff --git a/domain_resource/consumer-rules.txt b/domain_resource/consumer-rules.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/domain_resource/consumer-rules.txt @@ -0,0 +1 @@ + diff --git a/domain_resource/hvigorfile.ts b/domain_resource/hvigorfile.ts new file mode 100644 index 0000000..08f99a1 --- /dev/null +++ b/domain_resource/hvigorfile.ts @@ -0,0 +1,6 @@ +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/domain_resource/obfuscation-rules.txt b/domain_resource/obfuscation-rules.txt new file mode 100644 index 0000000..f5b5c78 --- /dev/null +++ b/domain_resource/obfuscation-rules.txt @@ -0,0 +1,3 @@ +# Obfuscation rules for this HAR module. +# See https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/source-obfuscation +-disable-obfuscation diff --git a/domain_resource/oh-package-lock.json5 b/domain_resource/oh-package-lock.json5 new file mode 100644 index 0000000..4c03084 --- /dev/null +++ b/domain_resource/oh-package-lock.json5 @@ -0,0 +1,40 @@ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "common@../common": "common@../common", + "contracts@../contracts": "contracts@../contracts", + "platform@../platform": "platform@../platform" + }, + "packages": { + "common@../common": { + "name": "common", + "version": "1.0.0", + "resolved": "../common", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts" + } + }, + "contracts@../contracts": { + "name": "contracts", + "version": "1.0.0", + "resolved": "../contracts", + "registryType": "local" + }, + "platform@../platform": { + "name": "platform", + "version": "1.0.0", + "resolved": "../platform", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common" + } + } + } +} \ No newline at end of file diff --git a/domain_resource/oh-package.json5 b/domain_resource/oh-package.json5 new file mode 100644 index 0000000..d2a8baa --- /dev/null +++ b/domain_resource/oh-package.json5 @@ -0,0 +1,13 @@ +{ + "name": "domain_resource", + "version": "1.0.0", + "description": "领域服务层:ConfigManager/ResourceManager/AppDataInjector/VersionResolver", + "main": "Index.ets", + "author": "", + "license": "Apache-2.0", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common", + "platform": "file:../platform" + } +} diff --git a/domain_resource/src/main/module.json5 b/domain_resource/src/main/module.json5 new file mode 100644 index 0000000..ac7f677 --- /dev/null +++ b/domain_resource/src/main/module.json5 @@ -0,0 +1,9 @@ +{ + "module": { + "name": "domain_resource", + "type": "har", + "deviceTypes": [ + "phone" + ] + } +} diff --git a/domain_resource/src/main/resources/base/element/string.json b/domain_resource/src/main/resources/base/element/string.json new file mode 100644 index 0000000..3a0d919 --- /dev/null +++ b/domain_resource/src/main/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "domain_resource_desc", + "value": "domain_resource module" + } + ] +} diff --git a/entry/oh-package-lock.json5 b/entry/oh-package-lock.json5 new file mode 100644 index 0000000..d0dcb42 --- /dev/null +++ b/entry/oh-package-lock.json5 @@ -0,0 +1,77 @@ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "common@../common": "common@../common", + "contracts@../contracts": "contracts@../contracts", + "domain_resource@../domain_resource": "domain_resource@../domain_resource", + "feature_bridge@../feature_bridge": "feature_bridge@../feature_bridge", + "feature_capabilities@../feature_capabilities": "feature_capabilities@../feature_capabilities", + "platform@../platform": "platform@../platform" + }, + "packages": { + "common@../common": { + "name": "common", + "version": "1.0.0", + "resolved": "../common", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts" + } + }, + "contracts@../contracts": { + "name": "contracts", + "version": "1.0.0", + "resolved": "../contracts", + "registryType": "local" + }, + "domain_resource@../domain_resource": { + "name": "domain_resource", + "version": "1.0.0", + "resolved": "../domain_resource", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common", + "platform": "file:../platform" + } + }, + "feature_bridge@../feature_bridge": { + "name": "feature_bridge", + "version": "1.0.0", + "resolved": "../feature_bridge", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common" + } + }, + "feature_capabilities@../feature_capabilities": { + "name": "feature_capabilities", + "version": "1.0.0", + "resolved": "../feature_capabilities", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common", + "platform": "file:../platform", + "domain_resource": "file:../domain_resource", + "feature_bridge": "file:../feature_bridge" + } + }, + "platform@../platform": { + "name": "platform", + "version": "1.0.0", + "resolved": "../platform", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common" + } + } + } +} \ No newline at end of file diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index 248c3b7..48a70c2 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -5,6 +5,13 @@ "main": "", "author": "", "license": "", - "dependencies": {} + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common", + "platform": "file:../platform", + "domain_resource": "file:../domain_resource", + "feature_bridge": "file:../feature_bridge", + "feature_capabilities": "file:../feature_capabilities" + } } diff --git a/feature_bridge/.gitignore b/feature_bridge/.gitignore new file mode 100644 index 0000000..36cebc0 --- /dev/null +++ b/feature_bridge/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test diff --git a/feature_bridge/BuildProfile.ets b/feature_bridge/BuildProfile.ets new file mode 100644 index 0000000..3a501e5 --- /dev/null +++ b/feature_bridge/BuildProfile.ets @@ -0,0 +1,17 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const HAR_VERSION = '1.0.0'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; +export const TARGET_NAME = 'default'; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly HAR_VERSION = HAR_VERSION; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; + static readonly TARGET_NAME = TARGET_NAME; +} \ No newline at end of file diff --git a/feature_bridge/Index.ets b/feature_bridge/Index.ets new file mode 100644 index 0000000..f085dc4 --- /dev/null +++ b/feature_bridge/Index.ets @@ -0,0 +1,3 @@ +// feature_bridge HAR —— 桥引擎层(导出入口 SSOT) +// 各子模块实现完成后在此统一 export。占位常量确保 HAR 可编译。 +export const feature_bridge_MODULE_VERSION: string = '1.0.0'; diff --git a/feature_bridge/build-profile.json5 b/feature_bridge/build-profile.json5 new file mode 100644 index 0000000..5432de6 --- /dev/null +++ b/feature_bridge/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": true, + "files": [ + "./obfuscation-rules.txt" + ] + }, + "consumerFiles": [ + "./consumer-rules.txt" + ] + } + } + } + ], + "targets": [ + { + "name": "default" + } + ] +} diff --git a/feature_bridge/consumer-rules.txt b/feature_bridge/consumer-rules.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/feature_bridge/consumer-rules.txt @@ -0,0 +1 @@ + diff --git a/feature_bridge/hvigorfile.ts b/feature_bridge/hvigorfile.ts new file mode 100644 index 0000000..08f99a1 --- /dev/null +++ b/feature_bridge/hvigorfile.ts @@ -0,0 +1,6 @@ +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/feature_bridge/obfuscation-rules.txt b/feature_bridge/obfuscation-rules.txt new file mode 100644 index 0000000..f5b5c78 --- /dev/null +++ b/feature_bridge/obfuscation-rules.txt @@ -0,0 +1,3 @@ +# Obfuscation rules for this HAR module. +# See https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/source-obfuscation +-disable-obfuscation diff --git a/feature_bridge/oh-package-lock.json5 b/feature_bridge/oh-package-lock.json5 new file mode 100644 index 0000000..9613757 --- /dev/null +++ b/feature_bridge/oh-package-lock.json5 @@ -0,0 +1,29 @@ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "common@../common": "common@../common", + "contracts@../contracts": "contracts@../contracts" + }, + "packages": { + "common@../common": { + "name": "common", + "version": "1.0.0", + "resolved": "../common", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts" + } + }, + "contracts@../contracts": { + "name": "contracts", + "version": "1.0.0", + "resolved": "../contracts", + "registryType": "local" + } + } +} \ No newline at end of file diff --git a/feature_bridge/oh-package.json5 b/feature_bridge/oh-package.json5 new file mode 100644 index 0000000..41d9f28 --- /dev/null +++ b/feature_bridge/oh-package.json5 @@ -0,0 +1,12 @@ +{ + "name": "feature_bridge", + "version": "1.0.0", + "description": "桥引擎层:BridgeController/MessageCodec/HandlerRegistry/SettingsProxy(与业务解耦,对能力零感知)", + "main": "Index.ets", + "author": "", + "license": "Apache-2.0", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common" + } +} diff --git a/feature_bridge/src/main/module.json5 b/feature_bridge/src/main/module.json5 new file mode 100644 index 0000000..7d42eb2 --- /dev/null +++ b/feature_bridge/src/main/module.json5 @@ -0,0 +1,9 @@ +{ + "module": { + "name": "feature_bridge", + "type": "har", + "deviceTypes": [ + "phone" + ] + } +} diff --git a/feature_bridge/src/main/resources/base/element/string.json b/feature_bridge/src/main/resources/base/element/string.json new file mode 100644 index 0000000..c76601d --- /dev/null +++ b/feature_bridge/src/main/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "feature_bridge_desc", + "value": "feature_bridge module" + } + ] +} diff --git a/feature_capabilities/.gitignore b/feature_capabilities/.gitignore new file mode 100644 index 0000000..36cebc0 --- /dev/null +++ b/feature_capabilities/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test diff --git a/feature_capabilities/BuildProfile.ets b/feature_capabilities/BuildProfile.ets new file mode 100644 index 0000000..3a501e5 --- /dev/null +++ b/feature_capabilities/BuildProfile.ets @@ -0,0 +1,17 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const HAR_VERSION = '1.0.0'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; +export const TARGET_NAME = 'default'; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly HAR_VERSION = HAR_VERSION; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; + static readonly TARGET_NAME = TARGET_NAME; +} \ No newline at end of file diff --git a/feature_capabilities/Index.ets b/feature_capabilities/Index.ets new file mode 100644 index 0000000..f66291a --- /dev/null +++ b/feature_capabilities/Index.ets @@ -0,0 +1,3 @@ +// feature_capabilities HAR —— 能力层(导出入口 SSOT) +// 各子模块实现完成后在此统一 export。占位常量确保 HAR 可编译。 +export const feature_capabilities_MODULE_VERSION: string = '1.0.0'; diff --git a/feature_capabilities/build-profile.json5 b/feature_capabilities/build-profile.json5 new file mode 100644 index 0000000..5432de6 --- /dev/null +++ b/feature_capabilities/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": true, + "files": [ + "./obfuscation-rules.txt" + ] + }, + "consumerFiles": [ + "./consumer-rules.txt" + ] + } + } + } + ], + "targets": [ + { + "name": "default" + } + ] +} diff --git a/feature_capabilities/consumer-rules.txt b/feature_capabilities/consumer-rules.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/feature_capabilities/consumer-rules.txt @@ -0,0 +1 @@ + diff --git a/feature_capabilities/hvigorfile.ts b/feature_capabilities/hvigorfile.ts new file mode 100644 index 0000000..08f99a1 --- /dev/null +++ b/feature_capabilities/hvigorfile.ts @@ -0,0 +1,6 @@ +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/feature_capabilities/obfuscation-rules.txt b/feature_capabilities/obfuscation-rules.txt new file mode 100644 index 0000000..f5b5c78 --- /dev/null +++ b/feature_capabilities/obfuscation-rules.txt @@ -0,0 +1,3 @@ +# Obfuscation rules for this HAR module. +# See https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/source-obfuscation +-disable-obfuscation diff --git a/feature_capabilities/oh-package-lock.json5 b/feature_capabilities/oh-package-lock.json5 new file mode 100644 index 0000000..4876ab5 --- /dev/null +++ b/feature_capabilities/oh-package-lock.json5 @@ -0,0 +1,63 @@ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "common@../common": "common@../common", + "contracts@../contracts": "contracts@../contracts", + "domain_resource@../domain_resource": "domain_resource@../domain_resource", + "feature_bridge@../feature_bridge": "feature_bridge@../feature_bridge", + "platform@../platform": "platform@../platform" + }, + "packages": { + "common@../common": { + "name": "common", + "version": "1.0.0", + "resolved": "../common", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts" + } + }, + "contracts@../contracts": { + "name": "contracts", + "version": "1.0.0", + "resolved": "../contracts", + "registryType": "local" + }, + "domain_resource@../domain_resource": { + "name": "domain_resource", + "version": "1.0.0", + "resolved": "../domain_resource", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common", + "platform": "file:../platform" + } + }, + "feature_bridge@../feature_bridge": { + "name": "feature_bridge", + "version": "1.0.0", + "resolved": "../feature_bridge", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common" + } + }, + "platform@../platform": { + "name": "platform", + "version": "1.0.0", + "resolved": "../platform", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common" + } + } + } +} \ No newline at end of file diff --git a/feature_capabilities/oh-package.json5 b/feature_capabilities/oh-package.json5 new file mode 100644 index 0000000..420f8d7 --- /dev/null +++ b/feature_capabilities/oh-package.json5 @@ -0,0 +1,15 @@ +{ + "name": "feature_capabilities", + "version": "1.0.0", + "description": "能力层:每个原生能力 = 一个 CapabilityProvider 插件", + "main": "Index.ets", + "author": "", + "license": "Apache-2.0", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common", + "platform": "file:../platform", + "domain_resource": "file:../domain_resource", + "feature_bridge": "file:../feature_bridge" + } +} diff --git a/feature_capabilities/src/main/module.json5 b/feature_capabilities/src/main/module.json5 new file mode 100644 index 0000000..8f8567f --- /dev/null +++ b/feature_capabilities/src/main/module.json5 @@ -0,0 +1,9 @@ +{ + "module": { + "name": "feature_capabilities", + "type": "har", + "deviceTypes": [ + "phone" + ] + } +} diff --git a/feature_capabilities/src/main/resources/base/element/string.json b/feature_capabilities/src/main/resources/base/element/string.json new file mode 100644 index 0000000..eff7cf3 --- /dev/null +++ b/feature_capabilities/src/main/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "feature_capabilities_desc", + "value": "feature_capabilities module" + } + ] +} diff --git a/platform/.gitignore b/platform/.gitignore new file mode 100644 index 0000000..36cebc0 --- /dev/null +++ b/platform/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test diff --git a/platform/BuildProfile.ets b/platform/BuildProfile.ets new file mode 100644 index 0000000..3a501e5 --- /dev/null +++ b/platform/BuildProfile.ets @@ -0,0 +1,17 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const HAR_VERSION = '1.0.0'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; +export const TARGET_NAME = 'default'; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly HAR_VERSION = HAR_VERSION; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; + static readonly TARGET_NAME = TARGET_NAME; +} \ No newline at end of file diff --git a/platform/Index.ets b/platform/Index.ets new file mode 100644 index 0000000..e3f586b --- /dev/null +++ b/platform/Index.ets @@ -0,0 +1,3 @@ +// platform HAR —— 平台服务层(导出入口 SSOT) +// 各子模块实现完成后在此统一 export。占位常量确保 HAR 可编译。 +export const platform_MODULE_VERSION: string = '1.0.0'; diff --git a/platform/build-profile.json5 b/platform/build-profile.json5 new file mode 100644 index 0000000..5432de6 --- /dev/null +++ b/platform/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": true, + "files": [ + "./obfuscation-rules.txt" + ] + }, + "consumerFiles": [ + "./consumer-rules.txt" + ] + } + } + } + ], + "targets": [ + { + "name": "default" + } + ] +} diff --git a/platform/consumer-rules.txt b/platform/consumer-rules.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/platform/consumer-rules.txt @@ -0,0 +1 @@ + diff --git a/platform/hvigorfile.ts b/platform/hvigorfile.ts new file mode 100644 index 0000000..08f99a1 --- /dev/null +++ b/platform/hvigorfile.ts @@ -0,0 +1,6 @@ +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/platform/obfuscation-rules.txt b/platform/obfuscation-rules.txt new file mode 100644 index 0000000..f5b5c78 --- /dev/null +++ b/platform/obfuscation-rules.txt @@ -0,0 +1,3 @@ +# Obfuscation rules for this HAR module. +# See https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/source-obfuscation +-disable-obfuscation diff --git a/platform/oh-package-lock.json5 b/platform/oh-package-lock.json5 new file mode 100644 index 0000000..9613757 --- /dev/null +++ b/platform/oh-package-lock.json5 @@ -0,0 +1,29 @@ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "common@../common": "common@../common", + "contracts@../contracts": "contracts@../contracts" + }, + "packages": { + "common@../common": { + "name": "common", + "version": "1.0.0", + "resolved": "../common", + "registryType": "local", + "dependencies": { + "contracts": "file:../contracts" + } + }, + "contracts@../contracts": { + "name": "contracts", + "version": "1.0.0", + "resolved": "../contracts", + "registryType": "local" + } + } +} \ No newline at end of file diff --git a/platform/oh-package.json5 b/platform/oh-package.json5 new file mode 100644 index 0000000..ee05594 --- /dev/null +++ b/platform/oh-package.json5 @@ -0,0 +1,12 @@ +{ + "name": "platform", + "version": "1.0.0", + "description": "平台服务层:HttpClient/Downloader/Unzipper/KvStore/PermissionGuard/LocalUploadServer/FileSystem/TaskScheduler", + "main": "Index.ets", + "author": "", + "license": "Apache-2.0", + "dependencies": { + "contracts": "file:../contracts", + "common": "file:../common" + } +} diff --git a/platform/src/main/module.json5 b/platform/src/main/module.json5 new file mode 100644 index 0000000..427166d --- /dev/null +++ b/platform/src/main/module.json5 @@ -0,0 +1,9 @@ +{ + "module": { + "name": "platform", + "type": "har", + "deviceTypes": [ + "phone" + ] + } +} diff --git a/platform/src/main/resources/base/element/string.json b/platform/src/main/resources/base/element/string.json new file mode 100644 index 0000000..21f3b4c --- /dev/null +++ b/platform/src/main/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "platform_desc", + "value": "platform module" + } + ] +}