From 1913b2e1e86fda2556af7449a1eebd02a052e3d9 Mon Sep 17 00:00:00 2001 From: Hongjin Li Date: Sat, 22 Jan 2022 10:47:33 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20netmanager=5Fbase=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1、添加bundle.json 2、部分BUILD.gn依赖解耦 Change-Id: Ie029a289274cb689143b9ca5bd4d5aa97a124639 Signed-off-by: Hongjin Li --- bundle.json | 112 ++++++++++++++++++ .../innerkits/dnsresolverclient/BUILD.gn | 7 +- interfaces/innerkits/netconnclient/BUILD.gn | 9 +- interfaces/innerkits/netpolicyclient/BUILD.gn | 7 +- interfaces/innerkits/netstatsclient/BUILD.gn | 11 +- services/common/BUILD.gn | 2 +- services/dnsresolvermanager/BUILD.gn | 2 +- services/netconnmanager/BUILD.gn | 2 +- services/netdcontroller/BUILD.gn | 2 +- services/netmanagernative/BUILD.gn | 3 +- services/netpolicymanager/BUILD.gn | 4 +- services/netstatsmanager/BUILD.gn | 2 +- 12 files changed, 130 insertions(+), 33 deletions(-) create mode 100644 bundle.json diff --git a/bundle.json b/bundle.json new file mode 100644 index 000000000..85a4da5ac --- /dev/null +++ b/bundle.json @@ -0,0 +1,112 @@ +{ + "name": "@ohos/netmanager_base", + "version": "3.1.0", + "description": "net manager service", + "publishAs": "code-segment", + "homePage": "https://gitee.com/openharmony", + "repository": "https://gitee.com/openharmony/communication_netmanager_base", + "license": "Apache License 2.0", + "language": "", + "private": false, + "scripts": {}, + "envs": [], + "dirs": [], + "author": {}, + "contributors": [], + "segment": { + "destPath": "//foundation/communication/netmanager_base" + }, + "component": { + "name": "netmanager_base", + "subsystem": "communication", + "syscap": [ + "SystemCapability.Communication.NetManagerBase" + ], + "features": [], + "adapted_system_type": [ + "standard" + ], + "rom": "", + "ram": "", + "deps": { + "components": [ + "ability_runtime", + "appexecfwk_standard", + "ces_standard", + "ipc", + "safwk", + "samgr_standard", + "utils_base" + ], + "third_party": [ + "curl", + "jsoncpp" + ] + }, + "build": { + "sub_component": [ + "//foundation/communication/netmanager_base/services/netmanagernative:netd_native_manager", + "//foundation/communication/netmanager_base/prebuilts/librarys/netd:libnet_manager_native", + "//foundation/communication/netmanager_base/services/netdcontroller:netd_controller", + "//foundation/communication/netmanager_base/services/netconnmanager:net_conn_manager", + "//foundation/communication/netmanager_base/services/dnsresolvermanager:dns_resolver_manager", + "//foundation/communication/netmanager_base/services/netpolicymanager:net_policy_manager", + "//foundation/communication/netmanager_base/services/netstatsmanager:net_stats_manager", + "//foundation/communication/netmanager_base/interfaces/innerkits/netconnclient:net_conn_manager_if", + "//foundation/communication/netmanager_base/interfaces/innerkits/dnsresolverclient:dns_resolver_manager_if", + "//foundation/communication/netmanager_base/interfaces/innerkits/netpolicyclient:net_policy_manager_if", + "//foundation/communication/netmanager_base/interfaces/innerkits/netstatsclient:net_stats_manager_if", + "//foundation/communication/netmanager_base/utils:net_manager_common", + "//foundation/communication/netmanager_base/services/etc/init:netmanager_base.rc", + "//foundation/communication/netmanager_base/services/etc/init:netdnative.rc", + "//foundation/communication/netmanager_base/sa_profile:net_manager_profile", + "//foundation/communication/netmanager_base/frameworks/js/napi/netpolicy:policy", + "//foundation/communication/netmanager_base/frameworks/js/napi/netstats:statistics", + "//foundation/communication/netmanager_base/frameworks/js/napi/netconn:connection" + ], + "inner_kits": [ + { + "type": "so", + "name": "//foundation/communication/netmanager_base/interfaces/innerkits/netconnclient:net_conn_manager_if", + "header": { + "header_files": [ + "net_conn_client.h", + "net_link_info.h", + "net_supplier_info.h", + "net_specifier.h", + "route.h" + ], + "header_base": "//foundation/communication/netmanager_base/interfaces/innerkits/netconnclient/include" + } + }, + { + "type": "so", + "name": "//foundation/communication/netmanager_base/interfaces/innerkits/netpolicyclient:net_policy_manager_if", + "header": { + "header_files": [ + "net_policy_client.h" + ], + "header_base": "//foundation/communication/netmanager_base/interfaces/innerkits/netpolicyclient/include" + } + }, + { + "type": "so", + "name": "//foundation/communication/netmanager_base/interfaces/innerkits/netstatsclient:net_stats_manager_if", + "header": { + "header_files": [ + "net_stats_info.h", + "net_stats_client.h" + ], + "header_base": "//foundation/communication/netmanager_base/interfaces/innerkits/netstatsclient/include" + } + } + ], + "test": [ + "//foundation/communication/netmanager_base/test/dnsresolvermanager:unittest", + "//foundation/communication/netmanager_base/test/netconnmanager:unittest", + "//foundation/communication/netmanager_base/test/netpolicymanager:unittest", + "//foundation/communication/netmanager_base/test/netstatsmanager:unittest" + ] + } + } +} diff --git a/interfaces/innerkits/dnsresolverclient/BUILD.gn b/interfaces/innerkits/dnsresolverclient/BUILD.gn index a6c306fc6..e65a82ecc 100644 --- a/interfaces/innerkits/dnsresolverclient/BUILD.gn +++ b/interfaces/innerkits/dnsresolverclient/BUILD.gn @@ -48,12 +48,9 @@ ohos_source_set("dns_resolver_parcel") { "$INNERKITS_ROOT/dnsresolverclient/include", ] - deps = [ - "$NETMANAGER_BASE_ROOT/utils:net_manager_common", - "//utils/native/base:utils", - ] + deps = [ "$NETMANAGER_BASE_ROOT/utils:net_manager_common" ] - external_deps = [] + external_deps = [ "utils_base:utils" ] if (is_standard_system) { external_deps += [ "hiviewdfx_hilog_native:libhilog" ] } else { diff --git a/interfaces/innerkits/netconnclient/BUILD.gn b/interfaces/innerkits/netconnclient/BUILD.gn index 65ff23345..7d7aadf96 100644 --- a/interfaces/innerkits/netconnclient/BUILD.gn +++ b/interfaces/innerkits/netconnclient/BUILD.gn @@ -40,9 +40,9 @@ config("net_conn_manager_if_config") { ohos_source_set("net_conn_parcel") { sources = [ "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/inet_addr.cpp", + "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/net_all_capabilities.cpp", "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/net_link_info.cpp", "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/net_specifier.cpp", - "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/net_all_capabilities.cpp", "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/net_supplier_info.cpp", "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/route.cpp", ] @@ -52,12 +52,9 @@ ohos_source_set("net_conn_parcel") { "$INNERKITS_ROOT/netconnclient/include", ] - deps = [ - "$NETMANAGER_BASE_ROOT/utils:net_manager_common", - "//utils/native/base:utils", - ] + deps = [ "$NETMANAGER_BASE_ROOT/utils:net_manager_common" ] - external_deps = [] + external_deps = [ "utils_base:utils" ] if (is_standard_system) { external_deps += [ "hiviewdfx_hilog_native:libhilog" ] } else { diff --git a/interfaces/innerkits/netpolicyclient/BUILD.gn b/interfaces/innerkits/netpolicyclient/BUILD.gn index 3f5a38a6e..1e0839918 100644 --- a/interfaces/innerkits/netpolicyclient/BUILD.gn +++ b/interfaces/innerkits/netpolicyclient/BUILD.gn @@ -44,12 +44,9 @@ ohos_source_set("net_policy_parcel") { include_dirs = [ "$INNERKITS_ROOT/netpolicyclient/include" ] - deps = [ - "$NETMANAGER_BASE_ROOT/utils:net_manager_common", - "//utils/native/base:utils", - ] + deps = [ "$NETMANAGER_BASE_ROOT/utils:net_manager_common" ] - external_deps = [] + external_deps = [ "utils_base:utils" ] if (is_standard_system) { external_deps += [ "hiviewdfx_hilog_native:libhilog" ] } else { diff --git a/interfaces/innerkits/netstatsclient/BUILD.gn b/interfaces/innerkits/netstatsclient/BUILD.gn index da2258282..5559eaba0 100644 --- a/interfaces/innerkits/netstatsclient/BUILD.gn +++ b/interfaces/innerkits/netstatsclient/BUILD.gn @@ -41,12 +41,9 @@ ohos_source_set("net_stats_parcel") { include_dirs = [ "$INNERKITS_ROOT/netstatsclient/include" ] - deps = [ - "$NETMANAGER_BASE_ROOT/utils:net_manager_common", - "//utils/native/base:utils", - ] + deps = [ "$NETMANAGER_BASE_ROOT/utils:net_manager_common" ] - external_deps = [] + external_deps = [ "utils_base:utils" ] if (is_standard_system) { external_deps += [ "hiviewdfx_hilog_native:libhilog" ] } else { @@ -62,9 +59,7 @@ ohos_shared_library("net_stats_manager_if") { "$NETSTATSMANAGER_INNERKITS_SOURCE_DIR/src/proxy/net_stats_service_proxy.cpp", ] - include_dirs = [ - "$NETDCONTROLLER_ROOT_DIR/include/", - ] + include_dirs = [ "$NETDCONTROLLER_ROOT_DIR/include/" ] public_configs = [ ":net_stats_manager_if_config" ] diff --git a/services/common/BUILD.gn b/services/common/BUILD.gn index 410593489..9ff9a5f16 100644 --- a/services/common/BUILD.gn +++ b/services/common/BUILD.gn @@ -35,13 +35,13 @@ ohos_shared_library("net_service_common") { "$INNERKITS_ROOT/netconnclient:net_conn_parcel", "$NETDCONTROLLER_ROOT_DIR:netd_controller", "$NETMANAGER_BASE_ROOT/utils:net_manager_common", - "//utils/native/base:utils", ] external_deps = [ "ability_runtime:want", "ces_standard:cesfwk_innerkits", "ipc:ipc_core", + "utils_base:utils", ] defines = [ diff --git a/services/dnsresolvermanager/BUILD.gn b/services/dnsresolvermanager/BUILD.gn index 23dc8ef3a..902aaa74f 100644 --- a/services/dnsresolvermanager/BUILD.gn +++ b/services/dnsresolvermanager/BUILD.gn @@ -38,7 +38,6 @@ ohos_shared_library("dns_resolver_manager") { "$NETCONNMANAGER_COMMON_DIR:net_service_common", "$NETDCONTROLLER_ROOT_DIR:netd_controller", "$NETMANAGER_BASE_ROOT/utils:net_manager_common", - "//utils/native/base:utils", ] external_deps = [ @@ -47,6 +46,7 @@ ohos_shared_library("dns_resolver_manager") { "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", + "utils_base:utils", ] defines = [ diff --git a/services/netconnmanager/BUILD.gn b/services/netconnmanager/BUILD.gn index a291ef5e9..14963b4d4 100644 --- a/services/netconnmanager/BUILD.gn +++ b/services/netconnmanager/BUILD.gn @@ -49,7 +49,6 @@ ohos_shared_library("net_conn_manager") { "$NETDCONTROLLER_ROOT_DIR:netd_controller", "$NETMANAGER_BASE_ROOT/utils:net_manager_common", "//third_party/curl:curl", - "//utils/native/base:utils", ] external_deps = [ @@ -59,6 +58,7 @@ ohos_shared_library("net_conn_manager") { "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", + "utils_base:utils", ] defines = [ diff --git a/services/netdcontroller/BUILD.gn b/services/netdcontroller/BUILD.gn index 77b361257..dcd9916e1 100644 --- a/services/netdcontroller/BUILD.gn +++ b/services/netdcontroller/BUILD.gn @@ -37,7 +37,6 @@ ohos_shared_library("netd_controller") { deps = [ "$NETMANAGER_BASE_ROOT/services/netmanagernative:netd_native_manager", "$NETMANAGER_BASE_ROOT/utils:net_manager_common", - "//utils/native/base:utils", ] external_deps = [ @@ -48,6 +47,7 @@ ohos_shared_library("netd_controller") { "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", + "utils_base:utils", ] defines = [ diff --git a/services/netmanagernative/BUILD.gn b/services/netmanagernative/BUILD.gn index 0fc723688..715ae782c 100644 --- a/services/netmanagernative/BUILD.gn +++ b/services/netmanagernative/BUILD.gn @@ -35,13 +35,11 @@ ohos_shared_library("netd_native_manager") { "$NETMANAGER_PREBUILTS_DIR/librarys/netd/include/common/include", "//foundation/communication/wifi/services/wifi_standard/wifi_framework/dhcp_manage/mgr_service/include", "//foundation/communication/wifi/services/wifi_standard/wifi_framework/dhcp_manage/mgr_service/interfaces", - "utils/native/base/include", ] deps = [ "$NETMANAGER_PREBUILTS_DIR/librarys/netd:libnet_manager_native", "//foundation/communication/wifi/services/wifi_standard/wifi_framework/dhcp_manage/mgr_service:dhcp_manager_service", - "//utils/native/base:utils", ] external_deps = [ @@ -51,6 +49,7 @@ ohos_shared_library("netd_native_manager") { "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", + "utils_base:utils", ] defines = [ diff --git a/services/netpolicymanager/BUILD.gn b/services/netpolicymanager/BUILD.gn index 160ccf5bd..3c11616ac 100644 --- a/services/netpolicymanager/BUILD.gn +++ b/services/netpolicymanager/BUILD.gn @@ -19,8 +19,8 @@ ohos_shared_library("net_policy_manager") { "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_callback.cpp", "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_file.cpp", "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_firewall.cpp", - "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_service_common.cpp", "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_service.cpp", + "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_service_common.cpp", "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_traffic.cpp", "$NETPOLICYMANAGER_SOURCE_DIR/src/stub/net_policy_callback_proxy.cpp", "$NETPOLICYMANAGER_SOURCE_DIR/src/stub/net_policy_service_stub.cpp", @@ -40,7 +40,6 @@ ohos_shared_library("net_policy_manager") { "$NETCONNMANAGER_COMMON_DIR:net_service_common", "$NETMANAGER_BASE_ROOT/utils:net_manager_common", "//third_party/jsoncpp:jsoncpp", - "//utils/native/base:utils", ] external_deps = [ @@ -50,6 +49,7 @@ ohos_shared_library("net_policy_manager") { "netmanager_base:net_stats_manager_if", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", + "utils_base:utils", ] defines = [ diff --git a/services/netstatsmanager/BUILD.gn b/services/netstatsmanager/BUILD.gn index 94be9f8f6..b23e1e832 100644 --- a/services/netstatsmanager/BUILD.gn +++ b/services/netstatsmanager/BUILD.gn @@ -42,7 +42,6 @@ ohos_shared_library("net_stats_manager") { "$NETDCONTROLLER_ROOT_DIR:netd_controller", "$NETMANAGER_BASE_ROOT/utils:net_manager_common", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//utils/native/base:utils", ] external_deps = [ @@ -52,6 +51,7 @@ ohos_shared_library("net_stats_manager") { "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", + "utils_base:utils", ] defines = [ -- Gitee