1# Copyright (c) 2022 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/ohos.gni") 15import("//foundation/distributeddatamgr/data_share/datashare.gni") 16 17ohos_shared_library("datashare_jscommon") { 18 branch_protector_ret = "pac_ret" 19 sanitize = { 20 cfi = true 21 cfi_cross_dso = true 22 debug = false 23 } 24 include_dirs = [ 25 "${datashare_common_native_path}/include", 26 "${datashare_common_napi_path}/include", 27 "${kvstore_common_path}", 28 ] 29 30 sources = [ 31 "${datashare_common_napi_path}/src/datashare_js_utils.cpp", 32 "${datashare_common_napi_path}/src/datashare_predicates_proxy.cpp", 33 "${datashare_common_napi_path}/src/napi_datashare_values_bucket.cpp", 34 ] 35 36 deps = [ "${datashare_innerapi_path}/common:datashare_common" ] 37 38 version_script = "libdatashare_jscommon.map" 39 40 external_deps = [ 41 "ability_base:zuri", 42 "c_utils:utils", 43 "hilog:libhilog", 44 "hisysevent:libhisysevent", 45 "hitrace:hitrace_meter", 46 "hitrace:libhitracechain", 47 "ipc:ipc_napi", 48 "ipc:ipc_single", 49 "napi:ace_napi", 50 ] 51 52 subsystem_name = "distributeddatamgr" 53 part_name = "data_share" 54} 55 56ohos_shared_library("datashare") { 57 branch_protector_ret = "pac_ret" 58 sanitize = { 59 cfi = true 60 cfi_cross_dso = true 61 debug = false 62 } 63 include_dirs = [ 64 "${datashare_napi_path}/dataShare/include", 65 "${datashare_common_napi_path}/include", 66 "${datashare_common_native_path}/include", 67 "${datashare_napi_path}/observer/include", 68 ] 69 70 sources = [ 71 "${datashare_common_napi_path}/src/datashare_error_impl.cpp", 72 "${datashare_common_napi_path}/src/datashare_result_set_proxy.cpp", 73 "${datashare_napi_path}/dataShare/src/async_call.cpp", 74 "${datashare_napi_path}/dataShare/src/napi_datashare_helper.cpp", 75 "${datashare_napi_path}/dataShare/src/napi_datashare_inner_observer.cpp", 76 "${datashare_napi_path}/dataShare/src/napi_datashare_observer.cpp", 77 "${datashare_napi_path}/dataShare/src/native_datashare_module.cpp", 78 "${datashare_napi_path}/observer/src/napi_observer.cpp", 79 "${datashare_napi_path}/observer/src/napi_subscriber_manager.cpp", 80 ] 81 82 deps = [ 83 ":datashare_jscommon", 84 "${datashare_innerapi_path}:datashare_consumer", 85 "${datashare_innerapi_path}/common:datashare_common", 86 "//third_party/libuv:uv", 87 ] 88 89 external_deps = [ 90 "ability_base:base", 91 "ability_base:want", 92 "ability_base:zuri", 93 "ability_runtime:abilitykit_native", 94 "ability_runtime:dataobs_manager", 95 "ability_runtime:napi_base_context", 96 "ability_runtime:napi_common", 97 "c_utils:utils", 98 "common_event_service:cesfwk_innerkits", 99 "hilog:libhilog", 100 "ipc:ipc_single", 101 "napi:ace_napi", 102 ] 103 104 relative_install_dir = "module/data" 105 106 subsystem_name = "distributeddatamgr" 107 part_name = "data_share" 108} 109 110ohos_shared_library("datasharepredicates") { 111 branch_protector_ret = "pac_ret" 112 sanitize = { 113 cfi = true 114 cfi_cross_dso = true 115 debug = false 116 } 117 include_dirs = [ 118 "${datashare_common_napi_path}/include", 119 "${datashare_common_native_path}/include", 120 ] 121 122 sources = [ "${datashare_napi_path}/dataShare/src/native_datashare_predicates_module.cpp" ] 123 124 deps = [ 125 ":datashare_jscommon", 126 "${datashare_innerapi_path}:datashare_consumer", 127 "${datashare_innerapi_path}/common:datashare_common", 128 ] 129 130 external_deps = [ 131 "c_utils:utils", 132 "hilog:libhilog", 133 "ipc:ipc_single", 134 "napi:ace_napi", 135 ] 136 137 relative_install_dir = "module/data" 138 139 subsystem_name = "distributeddatamgr" 140 part_name = "data_share" 141} 142