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 publicity_file = "publicity.xml" 29 subsystem_name = "telephony" 30 if (defined(sign_hap_py_path)) { 31 certificate_profile = "${certificate_profile_path}" 32 key_alias = "telephony_data" 33 private_key_path = "telephony_data" 34 compatible_version = "9" 35 } 36} 37 38ohos_app_scope("Telephony_DataAbility_app_profile") { 39 app_profile = "AppScope/app.json" 40 sources = [ "AppScope/resources" ] 41} 42 43ohos_js_assets("Telephony_DataAbility_js_assets") { 44 ets2abc = true 45 source_dir = "entry/src/main/ets" 46} 47 48ohos_resources("Telephony_DataAbility_resources") { 49 sources = [ "entry/src/main/resources" ] 50 deps = [ ":Telephony_DataAbility_app_profile" ] 51 hap_profile = "entry/src/main/module.json" 52} 53 54config("telephony_innerkits_config") { 55 include_dirs = [ "interfaces/innerkits/include" ] 56} 57 58config("telephony_data_config") { 59 include_dirs = [ 60 "common/include", 61 "opkey/include", 62 "opkey_version/include", 63 "pdp_profile/include", 64 "sim/include", 65 "sms_mms/include", 66 "global_params/include", 67 ] 68} 69 70ohos_shared_library("tel_telephony_data") { 71 sanitize = { 72 cfi = true 73 cfi_cross_dso = true 74 debug = false 75 } 76 branch_protector_ret = "pac_ret" 77 sources = [ 78 "common/src/data_storage_log_wrapper.cpp", 79 "common/src/parser_util.cpp", 80 "common/src/permission_util.cpp", 81 "common/src/preferences_util.cpp", 82 "common/src/rdb_base_callback.cpp", 83 "common/src/rdb_base_helper.cpp", 84 "common/src/telephony_datashare_stub_impl.cpp", 85 "global_params/src/global_params_ability.cpp", 86 "global_params/src/rdb_global_params_callback.cpp", 87 "global_params/src/rdb_global_params_helper.cpp", 88 "opkey/src/opkey_ability.cpp", 89 "opkey/src/rdb_opkey_callback.cpp", 90 "opkey/src/rdb_opkey_helper.cpp", 91 "opkey_version/src/opkey_version_ability.cpp", 92 "opkey_version/src/opkey_version_result_set_bridge.cpp", 93 "pdp_profile/src/pdp_profile_ability.cpp", 94 "pdp_profile/src/rdb_pdp_profile_callback.cpp", 95 "pdp_profile/src/rdb_pdp_profile_helper.cpp", 96 "sim/src/rdb_sim_callback.cpp", 97 "sim/src/rdb_sim_helper.cpp", 98 "sim/src/sim_ability.cpp", 99 "sms_mms/src/rdb_sms_mms_callback.cpp", 100 "sms_mms/src/rdb_sms_mms_helper.cpp", 101 "sms_mms/src/sms_mms_ability.cpp", 102 ] 103 104 configs = [ ":telephony_data_config" ] 105 106 public_configs = [ ":telephony_innerkits_config" ] 107 108 external_deps = [ 109 "ability_base:want", 110 "ability_base:zuri", 111 "ability_runtime:ability_manager", 112 "ability_runtime:abilitykit_native", 113 "ability_runtime:app_context", 114 "ability_runtime:dataobs_manager", 115 "ability_runtime:extensionkit_native", 116 "access_token:libaccesstoken_sdk", 117 "cJSON:cjson", 118 "c_utils:utils", 119 "common_event_service:cesfwk_innerkits", 120 "config_policy:configpolicy_util", 121 "core_service:tel_core_service_api", 122 "data_share:datashare_common", 123 "data_share:datashare_provider", 124 "hilog:libhilog", 125 "init:libbegetutil", 126 "ipc:ipc_single", 127 "napi:ace_napi", 128 "preferences:native_preferences", 129 "relational_store:native_rdb", 130 "relational_store:rdb_data_share_adapter", 131 "zlib:libz", 132 ] 133 defines = [ 134 "TELEPHONY_LOG_TAG = \"DataStorage\"", 135 "LOG_DOMAIN = 0xD001F05", 136 ] 137 138 if (defined(global_parts_info) && 139 defined(global_parts_info.telephony_telephony_enhanced) && 140 global_parts_info.telephony_telephony_enhanced) { 141 print( 142 "telephony_telephony_enhanced = ${global_parts_info.telephony_telephony_enhanced}") 143 defines += [ "OHOS_BUILD_ENABLE_TELEPHONY_EXT" ] 144 } 145 146 part_name = "telephony_data" 147 subsystem_name = "telephony" 148 innerapi_tags = [ "platformsdk_indirect" ] 149} 150