diff --git a/BUILD.gn b/BUILD.gn index c51710244e9eb1bbab75df65bab83827aeff9fb0..c70a22860ba06c0c465c5f8781bbf613cd91451a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -16,8 +16,8 @@ import("//build/ohos.gni") group("libremotefileshare") { deps = [ "interfaces/innerkits/native/file_share:fileshare_native", - "//foundation/filemanagement/app_file_service/interfaces/innerkits/remote_file_share/native:remote_file_share_native", - "//foundation/filemanagement/app_file_service/interfaces/kits/js:remotefileshare", + "interfaces/innerkits/remote_file_share/native:remote_file_share_native", + "interfaces/kits/js:remotefileshare", ] } diff --git a/app_file_service.gni b/app_file_service.gni index 1cef84c1adf4d0aa792a359f321026a16519c332..e97d1442674ff647dfb316a0793d31403306f95c 100644 --- a/app_file_service.gni +++ b/app_file_service.gni @@ -12,3 +12,7 @@ # limitations under the License. third_party_path = "//third_party" +utils_system_safwk_path = "//utils/system/safwk" +path_base = "//commonlibrary/c_utils/base" +path_napi = "//foundation/arkui/napi" +app_file_service_path = "//foundation/filemanagement/app_file_service" diff --git a/bundle.json b/bundle.json index 4f1a1d4c862ec891de34e2f87879a272c1a0b70e..36fdad9262d5af8be84311098ba52500bacc906b 100644 --- a/bundle.json +++ b/bundle.json @@ -17,11 +17,12 @@ "SystemCapability.FileManagement.AppFileService", "SystemCapability.FileManagement.StorageService.Backup" ], + "deps": {}, "adapted_system_type": [ "standard" ], - "rom": "", - "ram": "", + "rom": "1024KB", + "ram": "1024KB", "build": { "group_type": { "base_group": [], @@ -42,19 +43,19 @@ { "name": "//foundation/filemanagement/app_file_service/interfaces/innerkits/native/file_share:fileshare_native", "header": { - "header_files": [ - "file_share.h" - ], - "header_base": "//foundation/filemanagement/app_file_service/interfaces/innerkits/native/file_share/include" + "header_files": [ + "file_share.h" + ], + "header_base": "//foundation/filemanagement/app_file_service/interfaces/innerkits/native/file_share/include" } }, { "name": "//foundation/filemanagement/app_file_service/interfaces/innerkits/remote_file_share/native:remote_file_share_native", "header": { - "header_files": [ - "remote_file_share.h" - ], - "header_base": "//foundation/filemanagement/app_file_service/interfaces/innerkits/remote_file_share/native" + "header_files": [ + "remote_file_share.h" + ], + "header_base": "//foundation/filemanagement/app_file_service/interfaces/innerkits/remote_file_share/native" } }, { @@ -80,4 +81,4 @@ ] } } -} +} \ No newline at end of file diff --git a/interfaces/innerkits/remote_file_share/native/BUILD.gn b/interfaces/innerkits/remote_file_share/native/BUILD.gn index 6c93c13a24db0c098e710a0397e91813c003c402..2a3094ff8a8ceafb93b8071e525ee352fae63160 100644 --- a/interfaces/innerkits/remote_file_share/native/BUILD.gn +++ b/interfaces/innerkits/remote_file_share/native/BUILD.gn @@ -12,19 +12,19 @@ # limitations under the License. import("//build/ohos.gni") - +import("//foundation/filemanagement/app_file_service/app_file_service.gni") config("remote_file_share_config") { visibility = [ ":*" ] include_dirs = [ "include", - "//utils/system/safwk/native/include", - "//commonlibrary/c_utils/base/include", - "//foundation/filemanagement/app_file_service/interfaces/innerkits/remote_file_share/native", + "${utils_system_safwk_path}/native/include", + "${path_base}/include", + ".", ] } ohos_shared_library("remote_file_share_native") { - sources = [ "//foundation/filemanagement/app_file_service/services/remote_file_share/src/remote_file_share.cpp" ] + sources = [ "${app_file_service_path}/services/remote_file_share/src/remote_file_share.cpp" ] public_configs = [ ":remote_file_share_config" ] diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index b64a785569047363ddb256377293a52a6471c085..2c2cdb565c51ec43d9c53ce62530f8e26687959b 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -17,7 +17,7 @@ import("//foundation/filemanagement/app_file_service/backup.gni") ohos_shared_library("remotefileshare") { include_dirs = [ - "//foundation/arkui/napi/interfaces/kits", + "${path_napi}/interfaces/kits", "//third_party/bounds_checking_function/include", ] @@ -38,13 +38,13 @@ ohos_shared_library("remotefileshare") { ohos_shared_library("fileshare") { include_dirs = [ - "//foundation/filemanagement/app_file_service/interfaces/kits/js", - "//foundation/filemanagement/app_file_service/interfaces/kits/js/common", + ".", + "common", ] sources = [ - "//foundation/filemanagement/app_file_service/interfaces/kits/js/file_share/fileshare_n_exporter.cpp", - "//foundation/filemanagement/app_file_service/interfaces/kits/js/file_share/grant_uri_permission.cpp", + "file_share/fileshare_n_exporter.cpp", + "file_share/grant_uri_permission.cpp", ] external_deps = [ @@ -70,13 +70,13 @@ ohos_shared_library("fileshare") { ohos_shared_library("fileuri") { include_dirs = [ - "//foundation/filemanagement/app_file_service/interfaces/kits/js", - "//foundation/filemanagement/app_file_service/interfaces/kits/js/common", + ".", + "common", ] sources = [ - "//foundation/filemanagement/app_file_service/interfaces/kits/js/file_uri/file_uri_n_exporter.cpp", - "//foundation/filemanagement/app_file_service/interfaces/kits/js/file_uri/get_uri_from_path.cpp", + "file_uri/file_uri_n_exporter.cpp", + "file_uri/get_uri_from_path.cpp", ] external_deps = [ diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index dd4bc44e6660cef15cf1d2fdd82d6f119bb2debf..cb07dfdcfc8b0bbe22fe18197d921d2eb9236966 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -17,6 +17,6 @@ group("fuzztest") { deps += [ # deps file - "//foundation/filemanagement/app_file_service/test/fuzztest/remotefileshare_fuzzer:RemoteFileShareFuzzTest", + "remotefileshare_fuzzer:RemoteFileShareFuzzTest", ] } diff --git a/test/fuzztest/remotefileshare_fuzzer/BUILD.gn b/test/fuzztest/remotefileshare_fuzzer/BUILD.gn index 8322f005d75b5113ad748616d62c3d383b769d65..b3541874493b144cc4563664ea8806ab4a639f0b 100644 --- a/test/fuzztest/remotefileshare_fuzzer/BUILD.gn +++ b/test/fuzztest/remotefileshare_fuzzer/BUILD.gn @@ -19,7 +19,8 @@ import("//foundation/filemanagement/app_file_service/app_file_service.gni") ##############################fuzztest########################################## ohos_fuzztest("RemoteFileShareFuzzTest") { module_out_path = "filemanagement/app_file_service" - fuzz_config_file = "//foundation/filemanagement/app_file_service/test/fuzztest/remotefileshare_fuzzer" + fuzz_config_file = + "${app_file_service_path}/test/fuzztest/remotefileshare_fuzzer" include_dirs = [] cflags = [ "-g", diff --git a/test/unittest/remote_file_share/BUILD.gn b/test/unittest/remote_file_share/BUILD.gn index a9c46ef1dbf2125968bc61c1a2661dc896cefd30..8af8d3df729976c272b396e478b48fc37da930bc 100644 --- a/test/unittest/remote_file_share/BUILD.gn +++ b/test/unittest/remote_file_share/BUILD.gn @@ -12,10 +12,12 @@ # limitations under the License. import("//build/test.gni") +import("//foundation/filemanagement/app_file_service/app_file_service.gni") ohos_unittest("remote_file_share_test") { module_out_path = "filemanagement/app_file_service" - + fuzz_config_file = + "${app_file_service_path}/test/fuzztest/remotefileshare_fuzzer" resource_config_file = "../resource/ohos_test.xml" sources = [ "remote_file_share_test.cpp" ] @@ -23,8 +25,8 @@ ohos_unittest("remote_file_share_test") { include_dirs = [ "include", "../../../interfaces/innerkits/remote_file_share/native", - "//utils/system/safwk/native/include", - "//commonlibrary/c_utils/base/include", + "${utils_system_safwk_path}/native/include", + "${path_base}/include", ] deps = [