• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "pdp_profile/src/apn_encryption_util.cpp",
97    "pdp_profile/src/pdp_result_set_bridge.cpp",
98    "sim/src/rdb_sim_callback.cpp",
99    "sim/src/rdb_sim_helper.cpp",
100    "sim/src/sim_ability.cpp",
101    "sms_mms/src/rdb_sms_mms_callback.cpp",
102    "sms_mms/src/rdb_sms_mms_helper.cpp",
103    "sms_mms/src/sms_mms_ability.cpp",
104  ]
105
106  configs = [ ":telephony_data_config" ]
107
108  public_configs = [ ":telephony_innerkits_config" ]
109
110  external_deps = [
111    "ability_base:want",
112    "ability_base:zuri",
113    "ability_runtime:ability_manager",
114    "ability_runtime:abilitykit_native",
115    "ability_runtime:app_context",
116    "ability_runtime:dataobs_manager",
117    "ability_runtime:extensionkit_native",
118    "access_token:libaccesstoken_sdk",
119    "cJSON:cjson",
120    "c_utils:utils",
121    "common_event_service:cesfwk_innerkits",
122    "config_policy:configpolicy_util",
123    "core_service:tel_core_service_api",
124    "data_share:datashare_common",
125    "data_share:datashare_provider",
126    "hilog:libhilog",
127    "init:libbegetutil",
128    "ipc:ipc_single",
129    "napi:ace_napi",
130    "preferences:native_preferences",
131    "relational_store:native_rdb",
132    "relational_store:rdb_data_share_adapter",
133    "zlib:libz",
134    "huks:libhukssdk",
135    "kv_store:distributeddata_inner",
136    "ipc:ipc_napi",
137  ]
138
139  cflags_cc = [
140    "-Wunused",
141    "-Wunreachable-code",
142    "-fno-exceptions",
143    "-fno-rtti",
144    "-fstack-protector-all",
145    "-Os",
146    "-D_FORTIFY_SOURCE=2",
147    "-flto",
148  ]
149
150  defines = [
151    "TELEPHONY_LOG_TAG = \"DataStorage\"",
152    "LOG_DOMAIN = 0xD001F05",
153  ]
154
155  if (defined(global_parts_info) &&
156      defined(global_parts_info.telephony_telephony_enhanced) &&
157      global_parts_info.telephony_telephony_enhanced) {
158    print(
159        "telephony_telephony_enhanced = ${global_parts_info.telephony_telephony_enhanced}")
160    defines += [ "OHOS_BUILD_ENABLE_TELEPHONY_EXT" ]
161  }
162
163  part_name = "telephony_data"
164  subsystem_name = "telephony"
165  innerapi_tags = [ "platformsdk_indirect" ]
166}
167