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") { 18 include_dirs = [ 19 "${datashare_napi_path}/dataShare/include", 20 "${datashare_common_napi_path}/include", 21 "${datashare_common_native_path}/include", 22 ] 23 24 sources = [ 25 "${datashare_napi_path}/dataShare/src/async_call.cpp", 26 "${datashare_napi_path}/dataShare/src/napi_datashare_helper.cpp", 27 "${datashare_napi_path}/dataShare/src/napi_datashare_inner_observer.cpp", 28 "${datashare_napi_path}/dataShare/src/napi_datashare_observer.cpp", 29 "${datashare_napi_path}/dataShare/src/native_datashare_module.cpp", 30 ] 31 32 deps = [ 33 "${ability_runtime_inner_api_path}/dataobs_manager:dataobs_manager", 34 "${ability_runtime_napi_path}/inner/napi_common:napi_common", 35 "${datashare_innerapi_path}/common:datashare_common", 36 "//third_party/libuv:uv", 37 ] 38 39 external_deps = [ 40 "ability_base:base", 41 "ability_base:want", 42 "ability_base:zuri", 43 "ability_runtime:abilitykit_native", 44 "ability_runtime:napi_base_context", 45 "c_utils:utils", 46 "data_share:datashare_common", 47 "data_share:datashare_consumer", 48 "hiviewdfx_hilog_native:libhilog", 49 "ipc:ipc_core", 50 "napi:ace_napi", 51 "relational_store:native_appdatafwk", 52 ] 53 54 relative_install_dir = "module/data" 55 56 subsystem_name = "distributeddatamgr" 57 part_name = "data_share" 58} 59 60ohos_shared_library("datasharepredicates") { 61 include_dirs = [ 62 "${datashare_common_napi_path}/include", 63 "${datashare_common_native_path}/include", 64 ] 65 66 sources = [ 67 "${datashare_common_napi_path}/src/datashare_predicates_proxy.cpp", 68 "${datashare_napi_path}/dataShare/src/native_datashare_predicates_module.cpp", 69 ] 70 71 deps = [ "${datashare_innerapi_path}/common:datashare_common" ] 72 73 external_deps = [ 74 "c_utils:utils", 75 "data_share:datashare_common", 76 "data_share:datashare_consumer", 77 "hiviewdfx_hilog_native:libhilog", 78 "ipc:ipc_core", 79 "napi:ace_napi", 80 ] 81 82 relative_install_dir = "module/data" 83 84 subsystem_name = "distributeddatamgr" 85 part_name = "data_share" 86} 87