diff --git a/bundle.json b/bundle.json index 051ad6b0813219f5a3f2de9a77c04e5c50825010..c623b933be696e5623b56866e72a6fbca36aa498 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 5b933bd19f9131ab1dc1ad8e10a3b87e5e63579d..0823048db5a16b4c0acd0effc0e9d33b710e9bd8 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 b8bbd116a5ddd294928ae80158fa06eb3cfb2023..ebcbd69db61e03ffa8159c2de17c72bfc13250c4 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 1f585e054e4129c12ef76527db5b1d61bb4998b6..ad9997f7358ccfc30c053f0fefa80e0b459c01fe 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 fc1c7f1e7bf71dc8651350ef0215659a363da92a..68cbf5c47ea67a96abeba001e1681d7a134d8c88 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 48d6be334cf7f4e47a20996d4c4c68d688263a8e..d0b4f9d23ac50ec506867ba1a59182536a7e142a 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 ffb8aafc0d804376588bdfe1d7ccbe9faa8b1214..21dd8353e413ebe0d1bcfca039eeadaf667bee42 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