M0: 搭建多模块工程骨架(T-M0-01/T-M0-02)
- 在 entry 基础上新增 6 个 HAR:contracts/common/platform/domain_resource/feature_bridge/feature_capabilities(框架§4 工程结构) - 依赖单向向下、无环、无传递依赖(T-M0-02): contracts←common←platform←domain_resource;feature_bridge←(contracts,common); feature_capabilities←(全部下层);entry←(全部下层) - 各 HAR 含 build-profile/hvigorfile(harTasks)/module.json5(type:har)/Index.ets 导出入口 - devecocli build(debug) 全模块编译通过,entry 打包 HAP 成功 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
561af47817
commit
6de9038a54
@@ -0,0 +1,6 @@
|
||||
/node_modules
|
||||
/oh_modules
|
||||
/.preview
|
||||
/build
|
||||
/.cxx
|
||||
/.test
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// feature_bridge HAR —— 桥引擎层(导出入口 SSOT)
|
||||
// 各子模块实现完成后在此统一 export。占位常量确保 HAR 可编译。
|
||||
export const feature_bridge_MODULE_VERSION: string = '1.0.0';
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -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. */
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Obfuscation rules for this HAR module.
|
||||
# See https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/source-obfuscation
|
||||
-disable-obfuscation
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"module": {
|
||||
"name": "feature_bridge",
|
||||
"type": "har",
|
||||
"deviceTypes": [
|
||||
"phone"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": [
|
||||
{
|
||||
"name": "feature_bridge_desc",
|
||||
"value": "feature_bridge module"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user