• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/config/components/ets_frontend/ets2abc_config.gni")
15import("//build/ohos.gni")
16import("//foundation/filemanagement/dfs_service/distributedfile.gni")
17
18config("ani_config") {
19  include_dirs = [
20    "include",
21    "${interfaces_js_path}/ani/ani_helper/include",
22    "${interfaces_js_path}/cloudfilesync",
23  ]
24}
25
26ohos_shared_library("cloud_sync_ani") {
27  public_configs = [ ":ani_config" ]
28  sources = [
29    "${interfaces_js_path}/ani/ani_helper/src/ani_utils.cpp",
30    "${interfaces_js_path}/ani/ani_helper/src/error_handler.cpp",
31    "${interfaces_js_path}/cloudfilesync/cloud_file_cache_core.cpp",
32    "${interfaces_js_path}/cloudfilesync/cloud_file_core.cpp",
33    "${interfaces_js_path}/cloudfilesync/cloud_sync_core.cpp",
34    "${interfaces_js_path}/cloudfilesync/file_sync_core.cpp",
35    "${interfaces_js_path}/cloudfilesync/multi_download_progress_core.cpp",
36    "src/bind_function_class.cpp",
37    "src/cloud_download_ani.cpp",
38    "src/cloud_file_cache_ani.cpp",
39    "src/cloud_sync_ani.cpp",
40    "src/cloud_sync_callback_ani.cpp",
41    "src/download_callback_impl_ani.cpp",
42    "src/download_callback_middle_ani.cpp",
43    "src/download_progress_ani.cpp",
44    "src/file_sync_ani.cpp",
45    "src/multi_download_progress_ani.cpp",
46    "src/register_callback_manager_ani.cpp",
47  ]
48  sanitize = {
49    integer_overflow = true
50    ubsan = true
51    boundary_sanitize = true
52    cfi = true
53    cfi_cross_dso = true
54    debug = false
55  }
56  deps = [
57    "${innerkits_native_path}/cloudsync_kit_inner:cloudsync_kit_inner",
58    "${utils_path}:libdistributedfileutils",
59  ]
60  defines = [
61    "LOG_DOMAIN=0xD004309",
62    "LOG_TAG=\"CLOUD_FILE_SYNC\"",
63  ]
64  external_deps = [
65    "ability_base:zuri",
66    "ability_runtime:dataobs_manager",
67    "c_utils:utils",
68    "eventhandler:libeventhandler",
69    "file_api:filemgmt_libfs",
70    "hilog:libhilog",
71    "ipc:ipc_single",
72    "runtime_core:ani",
73    "runtime_core:ani_helpers",
74    "runtime_core:libarkruntime",
75  ]
76  part_name = "dfs_service"
77  subsystem_name = "filemanagement"
78  output_extension = "so"
79}
80
81generate_static_abc("file_cloud_sync") {
82  base_url = "./ets"
83  files = [ "./ets/@ohos.file.cloudSync.ets" ]
84  is_boot_abc = "True"
85  device_dst_file = "/system/framework/file_cloud_sync.abc"
86}
87
88ohos_prebuilt_etc("file_cloud_sync_etc") {
89  source = "$target_out_dir/file_cloud_sync.abc"
90  module_install_dir = "framework"
91  subsystem_name = "filemanagement"
92  part_name = "dfs_service"
93  deps = [ ":file_cloud_sync" ]
94}
95