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. 13import("//build/config/components/ets_frontend/ets2abc_config.gni") 14import("//build/ohos.gni") 15import("//foundation/distributeddatamgr/relational_store/relational_store.gni") 16 17ohos_shared_library("relationalstore_ani") { 18 sources = [ 19 "src/ani_rdb_entry.cpp", 20 "src/ani_rdb_error.cpp", 21 "src/ani_rdb_predicates.cpp", 22 "src/ani_rdb_store.cpp", 23 "src/ani_rdb_store_helper.cpp", 24 "src/ani_result_set.cpp", 25 "src/ani_utils.cpp", 26 ] 27 include_dirs = [ 28 "./include", 29 "${relational_store_common_path}/include", 30 ] 31 32 deps = [ 33 "${relational_store_innerapi_path}/rdb:native_rdb", 34 "${relational_store_innerapi_path}/rdb_data_share_adapter:rdb_data_share_adapter", 35 ] 36 37 external_deps = [ 38 "ability_runtime:abilitykit_native", 39 "ability_runtime:appkit_native", 40 "ability_runtime:wantagent_innerkits", 41 "c_utils:utils", 42 "data_share:datashare_common_lite", 43 "hilog:libhilog", 44 "runtime_core:ani", 45 "samgr:samgr_proxy", 46 ] 47 48 sanitize = { 49 boundary_sanitize = true 50 ubsan = true 51 cfi = true 52 cfi_cross_dso = true 53 debug = false 54 } 55 56 subsystem_name = "distributeddatamgr" 57 part_name = "relational_store" 58 output_extension = "so" 59} 60 61generate_static_abc("relationalstore_abc") { 62 base_url = "./ets" 63 files = [ "./ets/@ohos.data.relationalStore.ets" ] 64 dst_file = "$target_out_dir/relationalstore.abc" 65 out_puts = [ "$target_out_dir/relationalstore.abc" ] 66 is_boot_abc = "True" 67 device_dst_file = "/system/framework/relationalstore.abc" 68} 69 70ohos_prebuilt_etc("relationalstore_abc_etc") { 71 source = "$target_out_dir/relationalstore.abc" 72 module_install_dir = "framework" 73 subsystem_name = "distributeddatamgr" 74 part_name = "relational_store" 75 deps = [ ":relationalstore_abc" ] 76} 77 78group("relationalstore_ani_package") { 79 deps = [ 80 ":relationalstore_abc_etc", 81 ":relationalstore_ani", 82 ] 83} 84