1# Copyright (c) 2023 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. 13import("//build/ohos.gni") 14import("//build/ohos_var.gni") 15import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni") 16config("module_public_config") { 17 visibility = [ ":*" ] 18 include_dirs = [ 19 ".", 20 "strategies", 21 "common", 22 "data", 23 "dfx", 24 "../../adapter/include", 25 "../../app/src", 26 "../../framework/include", 27 "${data_service_path}/adapter/include/communicator", 28 "${data_service_path}/service/config/include", 29 "../common", 30 "../crypto/include", 31 "../permission/include", 32 ] 33 if (is_emulator) { 34 defines = [ "IS_EMULATOR" ] 35 } 36} 37group("build_module") { 38 deps = [ ":data_share_service" ] 39} 40ohos_source_set("data_share_service") { 41 branch_protector_ret = "pac_ret" 42 sanitize = { 43 ubsan = true 44 boundary_sanitize = true 45 cfi = true 46 cfi_cross_dso = true 47 debug = false 48 } 49 sources = [ 50 "common/app_connect_manager.cpp", 51 "common/bundle_mgr_proxy.cpp", 52 "common/common_utils.cpp", 53 "common/db_delegate.cpp", 54 "common/div_strategy.cpp", 55 "common/extension_ability_manager.cpp", 56 "common/extension_connect_adaptor.cpp", 57 "common/extension_mgr_proxy.cpp", 58 "common/kv_delegate.cpp", 59 "common/proxy_data_manager.cpp", 60 "common/rdb_delegate.cpp", 61 "common/scheduler_manager.cpp", 62 "common/seq_strategy.cpp", 63 "common/utils.cpp", 64 "data/published_data.cpp", 65 "data/resultset_json_formatter.cpp", 66 "data/template_data.cpp", 67 "data_provider_config.cpp", 68 "data_share_db_config.cpp", 69 "data_share_obs_proxy.cpp", 70 "data_share_profile_config.cpp", 71 "data_share_service_impl.cpp", 72 "data_share_service_stub.cpp", 73 "data_share_silent_config.cpp", 74 "data_share_types_util.cpp", 75 "dfx/hiview_adapter.cpp", 76 "dfx/hiview_fault_adapter.cpp", 77 "strategies/data_proxy/load_config_from_data_proxy_node_strategy.cpp", 78 "strategies/data_share/load_config_from_data_share_bundle_info_strategy.cpp", 79 "strategies/general/check_is_data_proxy_strategy.cpp", 80 "strategies/general/check_is_single_app_strategy.cpp", 81 "strategies/general/cross_permission_strategy.cpp", 82 "strategies/general/load_config_common_strategy.cpp", 83 "strategies/general/load_config_data_info_strategy.cpp", 84 "strategies/general/load_config_from_bundle_info_strategy.cpp", 85 "strategies/general/permission_strategy.cpp", 86 "strategies/get_data_strategy.cpp", 87 "strategies/publish_strategy.cpp", 88 "strategies/rdb_notify_strategy.cpp", 89 "strategies/subscribe_strategy.cpp", 90 "strategies/template_strategy.cpp", 91 "subscriber_managers/proxy_data_subscriber_manager.cpp", 92 "subscriber_managers/published_data_subscriber_manager.cpp", 93 "subscriber_managers/rdb_subscriber_manager.cpp", 94 "sys_event_subscriber.cpp", 95 ] 96 cflags = [ 97 "-Werror", 98 "-Wno-multichar", 99 "-D_LIBCPP_HAS_COND_CLOCKWAIT", 100 "-Oz", 101 ] 102 103 cflags_cc = [ 104 "-fvisibility=hidden", 105 "-Oz", 106 ] 107 108 configs = [ ":module_public_config" ] 109 110 deps = [ 111 "${data_service_path}/adapter/utils:distributeddata_utils", 112 "${data_service_path}/service/common:distributeddata_common", 113 "../../framework:distributeddatasvcfwk", 114 ] 115 116 external_deps = [ 117 "ability_base:want", 118 "ability_runtime:ability_connect_callback_stub", 119 "ability_runtime:dataobs_manager", 120 "ability_runtime:extension_manager", 121 "ability_runtime:wantagent_innerkits", 122 "access_token:libaccesstoken_sdk", 123 "access_token:libtokenid_sdk", 124 "bundle_framework:appexecfwk_base", 125 "bundle_framework:appexecfwk_core", 126 "c_utils:utils", 127 "data_share:datashare_common", 128 "data_share:datashare_common_lite", 129 "device_manager:devicemanagersdk", 130 "hicollie:libhicollie", 131 "hilog:libhilog", 132 "hisysevent:libhisysevent", 133 "ipc:ipc_core", 134 "json:nlohmann_json_static", 135 "kv_store:datamgr_common", 136 "kv_store:distributeddb", 137 "qos_manager:concurrent_task_client", 138 "qos_manager:qos", 139 "relational_store:native_rdb", 140 "relational_store:rdb_data_share_adapter", 141 "samgr:samgr_proxy", 142 "time_service:time_client", 143 ] 144 subsystem_name = "distributeddatamgr" 145 146 part_name = "datamgr_service" 147}