1# Copyright (c) 2021-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("signature/pm.gni") 16 17ohos_hap("Telephony_Data_Storage") { 18 hap_profile = "entry/src/main/module.json" 19 deps = [ 20 ":Telephony_DataAbility_js_assets", 21 ":Telephony_DataAbility_resources", 22 ] 23 shared_libraries = [ ":tel_telephony_data" ] 24 certificate_profile = "./signature/datastorage.p7b" 25 hap_name = "Telephony_Data_Storage" 26 module_install_dir = "app/com.ohos.telephonydataability" 27 part_name = "telephony_data" 28 subsystem_name = "telephony" 29 if (defined(sign_hap_py_path)) { 30 certificate_profile = "${certificate_profile_path}" 31 key_alias = "telephony_data" 32 private_key_path = "telephony_data" 33 compatible_version = "9" 34 } 35} 36 37ohos_app_scope("Telephony_DataAbility_app_profile") { 38 app_profile = "AppScope/app.json" 39 sources = [ "AppScope/resources" ] 40} 41 42ohos_js_assets("Telephony_DataAbility_js_assets") { 43 ets2abc = true 44 source_dir = "entry/src/main/ets" 45} 46 47ohos_resources("Telephony_DataAbility_resources") { 48 sources = [ "entry/src/main/resources" ] 49 deps = [ ":Telephony_DataAbility_app_profile" ] 50 hap_profile = "entry/src/main/module.json" 51} 52 53config("telephony_innerkits_config") { 54 include_dirs = [ "interfaces/innerkits/include" ] 55} 56 57config("telephony_data_config") { 58 include_dirs = [ 59 "common/include", 60 "opkey/include", 61 "pdp_profile/include", 62 "sim/include", 63 "sms_mms/include", 64 "global_params/include", 65 ] 66} 67 68ohos_shared_library("tel_telephony_data") { 69 sanitize = { 70 cfi = true 71 cfi_cross_dso = true 72 debug = false 73 } 74 branch_protector_ret = "pac_ret" 75 sources = [ 76 "common/src/data_storage_log_wrapper.cpp", 77 "common/src/parser_util.cpp", 78 "common/src/permission_util.cpp", 79 "common/src/preferences_util.cpp", 80 "common/src/rdb_base_callback.cpp", 81 "common/src/rdb_base_helper.cpp", 82 "common/src/telephony_datashare_stub_impl.cpp", 83 "global_params/src/global_params_ability.cpp", 84 "global_params/src/rdb_global_params_callback.cpp", 85 "global_params/src/rdb_global_params_helper.cpp", 86 "opkey/src/opkey_ability.cpp", 87 "opkey/src/rdb_opkey_callback.cpp", 88 "opkey/src/rdb_opkey_helper.cpp", 89 "pdp_profile/src/pdp_profile_ability.cpp", 90 "pdp_profile/src/rdb_pdp_profile_callback.cpp", 91 "pdp_profile/src/rdb_pdp_profile_helper.cpp", 92 "sim/src/rdb_sim_callback.cpp", 93 "sim/src/rdb_sim_helper.cpp", 94 "sim/src/sim_ability.cpp", 95 "sms_mms/src/rdb_sms_mms_callback.cpp", 96 "sms_mms/src/rdb_sms_mms_helper.cpp", 97 "sms_mms/src/sms_mms_ability.cpp", 98 ] 99 100 configs = [ ":telephony_data_config" ] 101 102 public_configs = [ ":telephony_innerkits_config" ] 103 104 deps = [ "//third_party/jsoncpp:jsoncpp" ] 105 106 external_deps = [ 107 "ability_base:want", 108 "ability_base:zuri", 109 "ability_runtime:ability_manager", 110 "ability_runtime:abilitykit_native", 111 "ability_runtime:app_context", 112 "ability_runtime:dataobs_manager", 113 "access_token:libaccesstoken_sdk", 114 "c_utils:utils", 115 "common_event_service:cesfwk_innerkits", 116 "config_policy:configpolicy_util", 117 "data_share:datashare_common", 118 "data_share:datashare_provider", 119 "hilog:libhilog", 120 "init:libbegetutil", 121 "ipc:ipc_single", 122 "napi:ace_napi", 123 "preferences:native_preferences", 124 "relational_store:native_rdb", 125 "relational_store:rdb_data_share_adapter", 126 ] 127 defines = [ 128 "TELEPHONY_LOG_TAG = \"DataStorage\"", 129 "LOG_DOMAIN = 0xD001F05", 130 ] 131 part_name = "telephony_data" 132 subsystem_name = "telephony" 133 innerapi_tags = [ "platformsdk_indirect" ] 134} 135