From 2ad0fd23275959f532bc17b6ff19ec8e71c560ba Mon Sep 17 00:00:00 2001 From: y30045862 Date: Fri, 28 Apr 2023 17:17:54 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=83=A8=E4=BB=B6=E5=8C=96=E6=95=B4?= =?UTF-8?q?=E6=94=B9=20Signed-off-by:=20yangjingbo10=20=20Change-Id:=20Ib8d55fca2fe0ad56890a0e5fbe6a6c3ea013ea93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iaa9e1da427757cd9e4e26bed80f13a6677493271 --- bundle.json | 9 ++++--- file_api.gni | 3 +++ interfaces/kits/js/BUILD.gn | 28 ++++++++++---------- interfaces/kits/native/BUILD.gn | 7 +++-- interfaces/test/unittest/remote_uri/BUILD.gn | 8 +++--- utils/filemgmt_libhilog/BUILD.gn | 6 ++--- utils/filemgmt_libn/BUILD.gn | 7 ++--- 7 files changed, 36 insertions(+), 32 deletions(-) diff --git a/bundle.json b/bundle.json index 051ad6b08..c623b933b 100644 --- a/bundle.json +++ b/bundle.json @@ -1,7 +1,7 @@ { - "name": "file_api", + "name": "@ohos/file_api", "description": "provides the application with JS interfaces for IO", - "version": "3.1", + "version": "4.0", "license": "Apache License 2.0", "publishAs": "code-segment", "segment": { @@ -19,14 +19,15 @@ ], "features": [], "adapted_system_type": ["standard"], - "rom": "", - "ram": "", + "rom": "4096KB", + "ram": "4096KB", "deps": { "components": [ "ability_base", "ability_manager", "appexecfwk_base", "appexecfwk_core", + "hiviewdfx", "want", "libhilog", "ipc_core", diff --git a/file_api.gni b/file_api.gni index 5b933bd19..0823048db 100644 --- a/file_api.gni +++ b/file_api.gni @@ -16,3 +16,6 @@ aafwk_path = "${aafwk_kits_path}/frameworks/kits" file_api_path = "//foundation/filemanagement/file_api" src_path = "${file_api_path}/interfaces/kits/js/src" utils_path = "${file_api_path}/utils" +hiviewdfx_hilog_path = "//base/hiviewdfx/hilog" +arkui_napi_path = "//foundation/arkui/napi" + diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index b8bbd116a..ebcbd69db 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -32,10 +32,10 @@ ohos_shared_library("fileio") { relative_install_dir = "module" include_dirs = [ - "//foundation/arkui/napi/interfaces/kits", - "//foundation/filemanagement/file_api/interfaces/kits/js/src/common/file_helper", - "//foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi", - "//foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi/n_async", + "${arkui_napi_path}/interfaces/kits", + "src/common/file_helper", + "src/common/napi", + "src/common/napi/n_async", "//third_party/node/src", "//third_party/bounds_checking_function/include", "//third_party/libuv/include", @@ -90,8 +90,8 @@ ohos_shared_library("fileio") { ] deps = [ - "//foundation/arkui/napi:ace_napi", - "//foundation/filemanagement/file_api/interfaces/kits/native:remote_uri_native", + "${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", ] @@ -193,10 +193,10 @@ ohos_shared_library("file") { relative_install_dir = "module" include_dirs = [ - "//foundation/arkui/napi/interfaces/kits", - "//foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi", - "//foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi/n_async", - "//foundation/filemanagement/file_api/interfaces/kits/js/src/common/file_helper", + "${arkui_napi_path}/interfaces/kits", + "src/common/napi", + "src/common/napi/n_async", + "src/common/file_helper", "//third_party/node/src", "//third_party/bounds_checking_function/include", ] @@ -211,7 +211,7 @@ ohos_shared_library("file") { deps = [ "${aafwk_kits_path}/ability/native:abilitykit_native", - "//foundation/arkui/napi:ace_napi", + "${arkui_napi_path}:ace_napi", "//third_party/bounds_checking_function:libsec_shared", ] @@ -292,8 +292,8 @@ ohos_shared_library("document") { relative_install_dir = "module" include_dirs = [ - "//foundation/arkui/napi/interfaces/kits", - "//foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi/n_async", + "${arkui_napi_path}/interfaces/kits", + "src/common/napi/n_async", "//third_party/node/src", ] @@ -308,7 +308,7 @@ ohos_shared_library("document") { "src/mod_document/document_napi.cpp", ] - deps = [ "//foundation/arkui/napi:ace_napi" ] + deps = [ "${arkui_napi_path}:ace_napi" ] external_deps = [ "hiviewdfx_hilog_native:libhilog" ] } diff --git a/interfaces/kits/native/BUILD.gn b/interfaces/kits/native/BUILD.gn index 1f585e054..ad9997f73 100644 --- a/interfaces/kits/native/BUILD.gn +++ b/interfaces/kits/native/BUILD.gn @@ -12,19 +12,18 @@ # limitations under the License. import("//build/ohos.gni") +import("//foundation/filemanagement/file_api/file_api.gni") config("remote_uri_config") { visibility = [ ":*" ] include_dirs = [ "include", - "//utils/system/safwk/native/include", - "//commonlibrary/c_utils/base/include", - "//foundation/filemanagement/file_api/interfaces/kits/native/remote_uri", + "remote_uri", ] } ohos_shared_library("remote_uri_native") { - sources = [ "//foundation/filemanagement/file_api/interfaces/kits/native/remote_uri/remote_uri.cpp" ] + sources = [ "remote_uri/remote_uri.cpp" ] public_configs = [ ":remote_uri_config" ] diff --git a/interfaces/test/unittest/remote_uri/BUILD.gn b/interfaces/test/unittest/remote_uri/BUILD.gn index fc1c7f1e7..68cbf5c47 100644 --- a/interfaces/test/unittest/remote_uri/BUILD.gn +++ b/interfaces/test/unittest/remote_uri/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//build/test.gni") +import("//foundation/filemanagement/file_api/file_api.gni") ohos_unittest("remote_uri_test") { module_out_path = "filemanagement/file_api" @@ -22,19 +23,18 @@ ohos_unittest("remote_uri_test") { include_dirs = [ "include", - "//utils/system/safwk/native/include", - "//commonlibrary/c_utils/base/include", - "//foundation/filemanagement/file_api/interfaces/kits/native/remote_uri", + "${file_api_path}/interfaces/kits/native/remote_uri", ] deps = [ - "//foundation/filemanagement/file_api/interfaces/kits/native:remote_uri_native", + "${file_api_path}/interfaces/kits/native:remote_uri_native", "//third_party/googletest:gtest_main", ] external_deps = [ "access_token:libaccesstoken_sdk", "c_utils:utils", + "c_utils:utilsbase", "ipc:ipc_core", ] } diff --git a/utils/filemgmt_libhilog/BUILD.gn b/utils/filemgmt_libhilog/BUILD.gn index 48d6be334..d0b4f9d23 100644 --- a/utils/filemgmt_libhilog/BUILD.gn +++ b/utils/filemgmt_libhilog/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//build/ohos.gni") +import("//foundation/filemanagement/file_api/file_api.gni") config("log_public_config") { visibility = [ ":*" ] @@ -21,9 +22,8 @@ config("log_public_config") { ohos_shared_library("filemgmt_libhilog") { public_configs = [ ":log_public_config" ] - public_deps = - [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ] + public_deps = [ "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog" ] subsystem_name = "filemanagement" part_name = "file_api" -} +} \ No newline at end of file diff --git a/utils/filemgmt_libn/BUILD.gn b/utils/filemgmt_libn/BUILD.gn index ffb8aafc0..21dd8353e 100644 --- a/utils/filemgmt_libn/BUILD.gn +++ b/utils/filemgmt_libn/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//build/ohos.gni") +import("//foundation/filemanagement/file_api/file_api.gni") config("libn_public_config") { visibility = [ ":*" ] @@ -35,10 +36,10 @@ ohos_shared_library("filemgmt_libn") { public_configs = [ ":libn_public_config" ] public_deps = [ - "//foundation/arkui/napi:ace_napi", - "//foundation/filemanagement/file_api/utils/filemgmt_libhilog", + "${file_api_path}/utils/filemgmt_libhilog", + "${arkui_napi_path}:ace_napi", ] subsystem_name = "filemanagement" part_name = "file_api" -} +} \ No newline at end of file -- Gitee From 74e591fc1e52d014aad24b8b6ad1bb3bbbb1d54a Mon Sep 17 00:00:00 2001 From: y30045862 Date: Thu, 4 May 2023 16:21:08 +0800 Subject: [PATCH 2/4] =?UTF-8?q?Code=20Check=20=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8CSigned-off-by:=20yangjingbo10=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I033d231af5c8522ab458553bb0b05449b8898e2e --- file_api.gni | 1 - 1 file changed, 1 deletion(-) diff --git a/file_api.gni b/file_api.gni index 0823048db..890e18262 100644 --- a/file_api.gni +++ b/file_api.gni @@ -18,4 +18,3 @@ src_path = "${file_api_path}/interfaces/kits/js/src" utils_path = "${file_api_path}/utils" hiviewdfx_hilog_path = "//base/hiviewdfx/hilog" arkui_napi_path = "//foundation/arkui/napi" - -- Gitee From 16876b37cb9966281eda74e459b7ee8d16c5f3f0 Mon Sep 17 00:00:00 2001 From: y30045862 Date: Thu, 4 May 2023 16:39:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8CSigned-off-by:=20yangjingbo10=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I958762ca8426ab3baea2f5f4a810e90e7fb216db --- utils/filemgmt_libhilog/BUILD.gn | 5 +++-- utils/filemgmt_libn/BUILD.gn | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/filemgmt_libhilog/BUILD.gn b/utils/filemgmt_libhilog/BUILD.gn index d0b4f9d23..abcf65651 100644 --- a/utils/filemgmt_libhilog/BUILD.gn +++ b/utils/filemgmt_libhilog/BUILD.gn @@ -22,8 +22,9 @@ config("log_public_config") { ohos_shared_library("filemgmt_libhilog") { public_configs = [ ":log_public_config" ] - public_deps = [ "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog" ] + public_deps = + [ "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog" ] subsystem_name = "filemanagement" part_name = "file_api" -} \ No newline at end of file +} diff --git a/utils/filemgmt_libn/BUILD.gn b/utils/filemgmt_libn/BUILD.gn index 21dd8353e..f7dbe0706 100644 --- a/utils/filemgmt_libn/BUILD.gn +++ b/utils/filemgmt_libn/BUILD.gn @@ -36,10 +36,10 @@ ohos_shared_library("filemgmt_libn") { public_configs = [ ":libn_public_config" ] public_deps = [ - "${file_api_path}/utils/filemgmt_libhilog", "${arkui_napi_path}:ace_napi", + "${file_api_path}/utils/filemgmt_libhilog", ] subsystem_name = "filemanagement" part_name = "file_api" -} \ No newline at end of file +} -- Gitee From c10e9e0ee4b433ac3a0ac6434ef7e00141b77e04 Mon Sep 17 00:00:00 2001 From: y30045862 Date: Thu, 4 May 2023 18:02:44 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=8E=92=E5=BA=8F,Signed-off-by:=20yangjin?= =?UTF-8?q?gbo10=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I237eafec1e157d9ffddecf278c435c58ae03927d --- bundle.json | 8 ++++---- file_api.gni | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bundle.json b/bundle.json index c623b933b..826574fd8 100644 --- a/bundle.json +++ b/bundle.json @@ -25,14 +25,14 @@ "components": [ "ability_base", "ability_manager", + "ace_napi", "appexecfwk_base", "appexecfwk_core", "hiviewdfx", - "want", - "libhilog", "ipc_core", - "ace_napi", - "samgr_proxy" + "libhilog", + "samgr_proxy", + "want" ], "third_party": [ "e2fsprogs" diff --git a/file_api.gni b/file_api.gni index 890e18262..df0cc8dbb 100644 --- a/file_api.gni +++ b/file_api.gni @@ -13,8 +13,8 @@ aafwk_kits_path = "//foundation/ability/ability_runtime/frameworks/native" aafwk_path = "${aafwk_kits_path}/frameworks/kits" +arkui_napi_path = "//foundation/arkui/napi" file_api_path = "//foundation/filemanagement/file_api" +hiviewdfx_hilog_path = "//base/hiviewdfx/hilog" src_path = "${file_api_path}/interfaces/kits/js/src" utils_path = "${file_api_path}/utils" -hiviewdfx_hilog_path = "//base/hiviewdfx/hilog" -arkui_napi_path = "//foundation/arkui/napi" -- Gitee