diff --git a/bundle.json b/bundle.json index ad8744a25fe5d27e869921f6bb080b277f2e0748..7ff8c77064742446ea91581f9423bc76b41d70bf 100644 --- a/bundle.json +++ b/bundle.json @@ -23,6 +23,7 @@ "ability_base", "ability_runtime", "access_token", + "ace_napi", "bundle_framework", "build_framework", "common_event_service", @@ -36,22 +37,21 @@ "hilog", "ipc", "init", + "json", + "jsoncpp", "napi", + "napi_common", + "openssl", "safwk", "samgr", - "storage_service", - "sandbox_manager" + "sandbox_manager", + "storage_service" ], "third_party": [ - "bounds_checking_function", - "jsoncpp", - "openssl" + "bounds_checking_function" ] }, - "adapted_system_type": [ - "small", - "standard" - ], + "adapted_system_type": [ "small", "standard" ], "rom": "1024KB", "ram": "1024KB", "build": { diff --git a/frameworks/native/backup_ext/BUILD.gn b/frameworks/native/backup_ext/BUILD.gn index eb044ee941024402744b702b845a89ec4965dbec..0f455ac5f4f2ae0b8a87aed5a7071aabbdefb2de 100644 --- a/frameworks/native/backup_ext/BUILD.gn +++ b/frameworks/native/backup_ext/BUILD.gn @@ -40,18 +40,11 @@ ohos_shared_library("backup_extension_ability_native") { "LOG_TAG=\"BackupExt\"", ] - include_dirs = [ - "include", - "${path_napi}/native_engine", - "${path_ability_runtime}/services/common/include", - "${path_ability_runtime}/interfaces/kits/napi/aafwk/inner/napi_common", - "${path_ability_runtime}/interfaces/kits/native/appkit/ability_runtime", - ] + include_dirs = [ "include" ] deps = [ "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", "${path_backup}/utils:backup_utils", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ @@ -60,6 +53,7 @@ ohos_shared_library("backup_extension_ability_native") { "ability_runtime:abilitykit_native", "ability_runtime:app_context", "ability_runtime:appkit_native", + "ability_runtime:napi_common", "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", @@ -67,6 +61,7 @@ ohos_shared_library("backup_extension_ability_native") { "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", + "jsoncpp:jsoncpp", "napi:ace_napi", ] diff --git a/interfaces/innerkits/native/BUILD.gn b/interfaces/innerkits/native/BUILD.gn index 36fe532127feab8f1e75a90740dd19fdfc2f8057..bdecbac5a01a18764d4f828f1179e5de1cf3a291 100644 --- a/interfaces/innerkits/native/BUILD.gn +++ b/interfaces/innerkits/native/BUILD.gn @@ -18,7 +18,6 @@ config("file_share_config") { visibility = [ ":*" ] include_dirs = [ "file_share/include", - "//third_party/json/include", "../../common/include", ] } @@ -27,7 +26,6 @@ config("file_uri_config") { visibility = [ ":*" ] include_dirs = [ "file_uri/include", - "//third_party/json/include", "../../common/include", ] } @@ -62,6 +60,7 @@ ohos_shared_library("fileshare_native") { "file_api:filemgmt_libn", "hilog:libhilog", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", ] defines = [] @@ -91,6 +90,7 @@ ohos_shared_library("fileuri_native") { "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", + "json:nlohmann_json_static", "samgr:samgr_proxy", ] @@ -117,10 +117,7 @@ config("remote_file_share_config") { visibility = [ ":*" ] include_dirs = [ "include", - "${utils_system_safwk_path}/native/include", "remote_file_share/include", - "//third_party/json/include", - "${path_base}/include", "../../common/include", ".", ] @@ -139,6 +136,8 @@ ohos_shared_library("remote_file_share_native") { "ability_base:zuri", "c_utils:utils", "hilog:libhilog", + "init:libbegetutil", + "json:nlohmann_json_static", ] if (defined(global_parts_info) && @@ -156,9 +155,6 @@ config("sandbox_helper_config") { visibility = [ ":*" ] include_dirs = [ "include", - "${utils_system_safwk_path}/native/include", - "//third_party/json/include", - "${path_base}/include", "../../common/include", ".", ] @@ -176,6 +172,8 @@ ohos_shared_library("sandbox_helper_native") { "ability_base:zuri", "c_utils:utils", "hilog:libhilog", + "init:libbegetutil", + "json:nlohmann_json_static", ] innerapi_tags = [ "platformsdk_indirect" ] diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index 2573f0e060292729383302c22ec5cec4343ad124..960d22b8054c7e370697fc8a4d9180d8a1df9a27 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -108,8 +108,6 @@ ohos_shared_library("backup") { subsystem_name = "filemanagement" part_name = "app_file_service" - include_dirs = [ "${path_napi}/interfaces/kits" ] - defines = [ "LOG_DOMAIN=0xD004306", "LOG_TAG=\"BackupNAPI\"", @@ -127,7 +125,6 @@ ohos_shared_library("backup") { deps = [ "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", "${path_backup}/utils:backup_utils", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ @@ -136,6 +133,7 @@ ohos_shared_library("backup") { "file_api:filemgmt_libn", "hilog:libhilog", "ipc:ipc_core", + "jsoncpp:jsoncpp", "napi:ace_napi", ] } diff --git a/services/backup_sa/BUILD.gn b/services/backup_sa/BUILD.gn index d4d08d4d3299fcca007097f4ae730bc42e9def0f..716541f37b0ef8deee4e50a4de878f93542572fc 100644 --- a/services/backup_sa/BUILD.gn +++ b/services/backup_sa/BUILD.gn @@ -56,7 +56,6 @@ ohos_shared_library("backup_sa") { deps = [ "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", "${path_backup}/utils:backup_utils", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ @@ -71,6 +70,7 @@ ohos_shared_library("backup_sa") { "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", + "jsoncpp:jsoncpp", "safwk:system_ability_fwk", "samgr:samgr_proxy", "storage_service:storage_manager_sa_proxy", diff --git a/tests/unittests/backup_ext/BUILD.gn b/tests/unittests/backup_ext/BUILD.gn index da0bb4a7e3754c1aa31995ef4b8d03101ba2c5cc..3c7384ceccc300a52b53b491765381123b1704cf 100644 --- a/tests/unittests/backup_ext/BUILD.gn +++ b/tests/unittests/backup_ext/BUILD.gn @@ -47,7 +47,6 @@ ohos_unittest("tar_file_test") { "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils:backup_utils", "${path_googletest}:gmock_main", - "${path_jsoncpp}:jsoncpp", ] cflags = [ "--coverage" ] @@ -66,6 +65,7 @@ ohos_unittest("tar_file_test") { "c_utils:utils", "hitrace:hitrace_meter", "ipc:ipc_core", + "jsoncpp:jsoncpp", "napi:ace_napi", "samgr:samgr_proxy", ] @@ -116,7 +116,6 @@ ohos_unittest("untar_file_test") { "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils:backup_utils", "${path_googletest}:gmock_main", - "${path_jsoncpp}:jsoncpp", ] cflags = [ "--coverage" ] @@ -135,6 +134,7 @@ ohos_unittest("untar_file_test") { "c_utils:utils", "hitrace:hitrace_meter", "ipc:ipc_core", + "jsoncpp:jsoncpp", "napi:ace_napi", "samgr:samgr_proxy", ] diff --git a/tests/unittests/backup_sa/module_ipc/BUILD.gn b/tests/unittests/backup_sa/module_ipc/BUILD.gn index 07156825083018fa3483f092fe1c1e278aa5068c..f4c1e24ac693b4613a288e1b5304dd18fce69845 100644 --- a/tests/unittests/backup_sa/module_ipc/BUILD.gn +++ b/tests/unittests/backup_sa/module_ipc/BUILD.gn @@ -98,7 +98,6 @@ ohos_unittest("backup_service_test") { "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils:backup_utils", "${path_googletest}:gmock_main", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ @@ -111,6 +110,7 @@ ohos_unittest("backup_service_test") { "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", + "jsoncpp:jsoncpp", "safwk:system_ability_fwk", "samgr:samgr_proxy", "storage_service:storage_manager_sa_proxy", @@ -162,7 +162,6 @@ ohos_unittest("backup_service_session_test") { "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils:backup_utils", "${path_googletest}:gmock_main", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ @@ -175,6 +174,7 @@ ohos_unittest("backup_service_session_test") { "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", + "jsoncpp:jsoncpp", "safwk:system_ability_fwk", "samgr:samgr_proxy", "storage_service:storage_manager_sa_proxy", @@ -271,7 +271,6 @@ ohos_unittest("backup_restore_deps_manager_test") { "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils:backup_utils", "${path_googletest}:gmock_main", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ @@ -284,6 +283,7 @@ ohos_unittest("backup_restore_deps_manager_test") { "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", + "jsoncpp:jsoncpp", "safwk:system_ability_fwk", "samgr:samgr_proxy", "storage_service:storage_manager_sa_proxy", diff --git a/tests/unittests/backup_tools/BUILD.gn b/tests/unittests/backup_tools/BUILD.gn index 862387a272f82d3aa7747f1e339cd279c6b90b24..01383ce884e1fe8a4dc1bb38ab9f7e35f5e92d63 100644 --- a/tests/unittests/backup_tools/BUILD.gn +++ b/tests/unittests/backup_tools/BUILD.gn @@ -47,7 +47,6 @@ ohos_unittest("backup_tool_test") { "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils:backup_utils", "${path_googletest}:gmock_main", - "${path_jsoncpp}:jsoncpp", ] cflags = [ "--coverage" ] @@ -61,6 +60,7 @@ ohos_unittest("backup_tool_test") { "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", + "jsoncpp:jsoncpp", "samgr:samgr_proxy", ] @@ -104,7 +104,6 @@ ohos_unittest("backup_tool_restore_test") { "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils:backup_utils", "${path_googletest}:gmock_main", - "${path_jsoncpp}:jsoncpp", ] cflags = [ "--coverage" ] @@ -118,6 +117,7 @@ ohos_unittest("backup_tool_restore_test") { "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", + "jsoncpp:jsoncpp", "samgr:samgr_proxy", ] diff --git a/tests/unittests/backup_utils/BUILD.gn b/tests/unittests/backup_utils/BUILD.gn index b67e7a51ed27b84558634b3b19128f96fce3209b..0a2bf8f5cdad740fe1ef184eb80b7d6ded776838 100644 --- a/tests/unittests/backup_utils/BUILD.gn +++ b/tests/unittests/backup_utils/BUILD.gn @@ -57,12 +57,12 @@ ohos_unittest("b_file_test") { deps = [ "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils/:backup_utils", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ "c_utils:utils", "hilog:libhilog", + "jsoncpp:jsoncpp", ] use_exceptions = true @@ -117,12 +117,12 @@ ohos_unittest("b_json_test") { "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils/:backup_utils", "${path_googletest}:gmock_main", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ "c_utils:utils", "hilog:libhilog", + "jsoncpp:jsoncpp", ] sanitize = { @@ -219,11 +219,11 @@ ohos_unittest("b_process_test") { deps = [ "${path_backup}/tests/utils:backup_test_utils", "${path_backup}/utils/:backup_utils", - "${path_jsoncpp}:jsoncpp", ] external_deps = [ "c_utils:utils", "hilog:libhilog", + "jsoncpp:jsoncpp", ] use_exceptions = true diff --git a/tools/backup_tool/BUILD.gn b/tools/backup_tool/BUILD.gn index f867682930461e4923d37bea590f33971aa4511b..87c7cfd5d2cfc4abef1f7304ec23669ec4de6bdd 100644 --- a/tools/backup_tool/BUILD.gn +++ b/tools/backup_tool/BUILD.gn @@ -31,7 +31,6 @@ ohos_executable("backup_tool") { deps += [ "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", "${path_backup}/utils/:backup_utils", - "${path_jsoncpp}:jsoncpp", ] sources += [ @@ -51,6 +50,7 @@ ohos_executable("backup_tool") { "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", + "jsoncpp:jsoncpp", ] defines += [ "BACKUP_TOOL_ENABLE=1" ] diff --git a/utils/BUILD.gn b/utils/BUILD.gn index 5893b725e7cc772056751d724999d3d651a32bdf..f48d111a91dd1202b732440b81a4ac6c350fd1ec 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -25,7 +25,6 @@ config("utils_public_config") { include_dirs = [ "include", "include/b_hilog", - "${path_base}/include", ] } @@ -99,6 +98,7 @@ ohos_shared_library("backup_utils") { configs = [ ":utils_private_config" ] public_configs = [ ":utils_public_config" ] + public_external_deps = [ "c_utils:utilsbase" ] external_deps = [ "cJSON:cjson", @@ -107,12 +107,13 @@ ohos_shared_library("backup_utils") { "hilog:libhilog", "hitrace:hitrace_meter", "init:libbegetutil", + "json:nlohmann_json_static", + "jsoncpp:jsoncpp", + "openssl:libcrypto_shared", ] include_dirs = [ - "${path_init}/interfaces/innerkits/include/syspara", "${path_backup}/interfaces/inner_api/native/backup_kit_inner/impl", - "${path_rust}/crates/cxx/include", "${target_gen_dir}/rust/src", ] @@ -120,8 +121,6 @@ ohos_shared_library("backup_utils") { ":backup_cxx_cppdeps", ":backup_cxx_gen", ":backup_cxx_rust", - "${path_jsoncpp}:jsoncpp", - "//third_party/openssl:libcrypto_shared", ] use_exceptions = true