1# Copyright (c) 2021-2023 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("//base/notification/distributed_notification_service/notification.gni") 15import("//build/ohos.gni") 16 17group("napi_reminder") { 18 deps = [ 19 "src/reminder:reminderagent", 20 "src/reminder:reminderagentmanager", 21 ] 22} 23 24group("napi_notification") { 25 deps = [ 26 ":notification", 27 "src/manager:notificationmanager", 28 "src/subscribe:notificationsubscribe", 29 ] 30} 31 32cflags = [ 33 "-fno-math-errno", 34 "-fno-unroll-loops", 35 "-fmerge-all-constants", 36 "-fno-ident", 37 "-Oz", 38 "-flto", 39 "-ffunction-sections", 40 "-fdata-sections", 41] 42 43config("native_module_config") { 44 visibility = [ ":*" ] 45 46 include_dirs = [] 47 48 if (target_cpu == "arm") { 49 cflags += [ "-DBINDER_IPC_32BIT" ] 50 } 51} 52 53ohos_shared_library("notification") { 54 sanitize = { 55 integer_overflow = true 56 ubsan = true 57 boundary_sanitize = true 58 cfi = true 59 cfi_cross_dso = true 60 debug = false 61 } 62 branch_protector_ret = "pac_ret" 63 64 include_dirs = [ 65 "${ability_runtime_path}/interfaces/kits/native/ability/native", 66 "${ability_runtime_napi_path}/inner/napi_common", 67 "include", 68 "//third_party/node/src", 69 "//third_party/libuv/include", 70 "//third_party/json/single_include", 71 ] 72 73 configs = [ ":native_module_config" ] 74 75 sources = [ 76 "src/ans_template.cpp", 77 "src/cancel.cpp", 78 "src/common.cpp", 79 "src/common_convert_content.cpp", 80 "src/common_convert_liveview.cpp", 81 "src/common_convert_notification.cpp", 82 "src/common_convert_request.cpp", 83 "src/common_utils.cpp", 84 "src/constant.cpp", 85 "src/display_badge.cpp", 86 "src/distributed.cpp", 87 "src/disturb_mode.cpp", 88 "src/enable_notification.cpp", 89 "src/get_active.cpp", 90 "src/init.cpp", 91 "src/js_ans_dialog_callback.cpp", 92 "src/publish.cpp", 93 "src/remove.cpp", 94 "src/slot.cpp", 95 "src/subscribe.cpp", 96 "src/unsubscribe.cpp", 97 ] 98 99 deps = [ "${frameworks_module_ans_path}:ans_innerkits" ] 100 101 external_deps = [ 102 "ability_base:want", 103 "ability_base:zuri", 104 "ability_runtime:ability_manager", 105 "ability_runtime:abilitykit_native", 106 "ability_runtime:app_context", 107 "ability_runtime:napi_common", 108 "ability_runtime:wantagent_innerkits", 109 "c_utils:utils", 110 "hilog:libhilog", 111 "image_framework:image", 112 "napi:ace_napi", 113 "relational_store:native_rdb", 114 "resource_management:global_resmgr", 115 ] 116 117 relative_install_dir = "module" 118 subsystem_name = "${subsystem_name}" 119 part_name = "${component_name}" 120} 121