From 13073cb7425c19e3c42de836d00232919e582405 Mon Sep 17 00:00:00 2001 From: y30045862 Date: Tue, 11 Jul 2023 16:48:13 +0800 Subject: [PATCH] =?UTF-8?q?file=20api=20=E9=80=9A=E8=BF=87external=5Fdeps?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2public=5Fdeps=20Signed-off-by:=20yangjingbo10?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibda2108676d114d2235421dbc8fbf2815b979e5f --- bundle.json | 9 ++++ interfaces/kits/js/BUILD.gn | 76 +++++++++++++++++++++++++------- utils/filemgmt_libhilog/BUILD.gn | 12 +---- utils/filemgmt_libn/BUILD.gn | 9 ++-- 4 files changed, 78 insertions(+), 28 deletions(-) diff --git a/bundle.json b/bundle.json index c736892c7..702b93654 100644 --- a/bundle.json +++ b/bundle.json @@ -69,6 +69,15 @@ ], "header_base": "//foundation/filemanagement/file_api/utils/filemgmt_libn/include" } + }, + { + "name": "//foundation/filemanagement/file_api/utils/filemgmt_libhilog:filemgmt_libhilog", + "header": { + "header_files": [ + "filemgmt_libhilog.h" + ], + "header_base": "//foundation/filemanagement/file_api/utils/filemgmt_libhilog" + } } ], "test": [ diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index b13c97dba..3e4a447d0 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -90,13 +90,15 @@ ohos_shared_library("fileio") { ] deps = [ - "${arkui_napi_path}:ace_napi", "${file_api_path}/interfaces/kits/native:remote_uri_native", "//third_party/bounds_checking_function:libsec_shared", "//third_party/openssl:libcrypto_shared", ] - external_deps = [ "hilog:libhilog" ] + external_deps = [ + "hilog:libhilog", + "napi:ace_napi", + ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } @@ -135,7 +137,10 @@ ohos_shared_library("fs") { cflags_cc = [ "-std=c++17" ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] use_exceptions = true @@ -146,6 +151,11 @@ ohos_shared_library("fs") { defines = [ "IOS_PLATFORM" ] } + external_deps = [ + "hilog:libhilog", + "napi:ace_napi", + ] + if (!use_mingw_win && !use_mac) { sources += [ "src/mod_fs/class_stream/flush.cpp", @@ -163,7 +173,7 @@ ohos_shared_library("fs") { "src/mod_fs/properties/symlink.cpp", "src/mod_fs/properties/watcher.cpp", ] - external_deps = [ + external_deps += [ "ability_base:zuri", "ability_runtime:abilitykit_native", "access_token:libtokenid_sdk", @@ -195,10 +205,16 @@ ohos_shared_library("hash") { ] deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", "${utils_path}/filemgmt_libn:filemgmt_libn", "//third_party/bounds_checking_function:libsec_shared", "//third_party/openssl:libcrypto_shared", ] + + external_deps = [ + "hilog:libhilog", + "napi:ace_napi", + ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } @@ -225,16 +241,14 @@ ohos_shared_library("file") { "src/mod_file/module.cpp", ] - deps = [ - "${arkui_napi_path}:ace_napi", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "ability_runtime:abilitykit_native", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hilog:libhilog", + "napi:ace_napi", ] } @@ -249,7 +263,15 @@ ohos_shared_library("statfs") { "src/mod_statfs/statfs_napi.cpp", ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] + + external_deps = [ + "hilog:libhilog", + "napi:ace_napi", + ] } ohos_shared_library("statvfs") { @@ -263,7 +285,15 @@ ohos_shared_library("statvfs") { "src/mod_statvfs/statvfs_napi.cpp", ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] + + external_deps = [ + "hilog:libhilog", + "napi:ace_napi", + ] } ohos_shared_library("environment") { @@ -277,11 +307,16 @@ ohos_shared_library("environment") { "src/mod_environment/environment_napi.cpp", ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] external_deps = [ "access_token:libtokenid_sdk", + "hilog:libhilog", "ipc:ipc_core", + "napi:ace_napi", ] } @@ -298,7 +333,17 @@ ohos_shared_library("securitylabel") { "src/mod_securitylabel/securitylabel_napi.cpp", ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] + + external_deps = [ + "access_token:libtokenid_sdk", + "hilog:libhilog", + "ipc:ipc_core", + "napi:ace_napi", + ] } ohos_shared_library("document") { @@ -324,9 +369,10 @@ ohos_shared_library("document") { "src/mod_document/document_napi.cpp", ] - deps = [ "${arkui_napi_path}:ace_napi" ] - - external_deps = [ "hilog:libhilog" ] + external_deps = [ + "hilog:libhilog", + "napi:ace_napi", + ] } group("build_kits_js") { diff --git a/utils/filemgmt_libhilog/BUILD.gn b/utils/filemgmt_libhilog/BUILD.gn index 8d0e5f9b0..e5dc1d3a7 100644 --- a/utils/filemgmt_libhilog/BUILD.gn +++ b/utils/filemgmt_libhilog/BUILD.gn @@ -14,15 +14,6 @@ import("//build/ohos.gni") import("//foundation/filemanagement/file_api/file_api.gni") -label_hilog = "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog" -if (use_mac) { - label_hilog = - "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog_mac" -} else if (use_mingw_win) { - label_hilog = - "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog_windows" -} - config("log_public_config") { visibility = [ ":*" ] @@ -31,7 +22,8 @@ config("log_public_config") { ohos_shared_library("filemgmt_libhilog") { public_configs = [ ":log_public_config" ] - public_deps = [ label_hilog ] + + external_deps = [ "hilog:libhilog" ] subsystem_name = "filemanagement" innerapi_tags = [ "platformsdk" ] diff --git a/utils/filemgmt_libn/BUILD.gn b/utils/filemgmt_libn/BUILD.gn index c1a019973..6ebeaa444 100644 --- a/utils/filemgmt_libn/BUILD.gn +++ b/utils/filemgmt_libn/BUILD.gn @@ -44,9 +44,12 @@ ohos_shared_library("filemgmt_libn") { } public_configs = [ ":libn_public_config" ] - public_deps = [ - "${arkui_napi_path}:ace_napi", - "${file_api_path}/utils/filemgmt_libhilog", + + deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog" ] + + external_deps = [ + "hilog:libhilog", + "napi:ace_napi", ] use_exceptions = true -- Gitee