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("//base/notification/distributed_notification_service/notification.gni") 15import("//build/ohos.gni") 16 17group("ans_targets") { 18 deps = [ ":libans" ] 19} 20 21config("public_ans_config") { 22 include_dirs = [ "${services_path}/ans/include" ] 23} 24 25ohos_shared_library("libans") { 26 include_dirs = [ "include" ] 27 28 sources = [ 29 "src/access_token_helper.cpp", 30 "src/advanced_notification_service.cpp", 31 "src/advanced_notification_service_ability.cpp", 32 "src/bundle_manager_helper.cpp", 33 "src/event_report.cpp", 34 "src/notification_dialog.cpp", 35 "src/notification_preferences.cpp", 36 "src/notification_preferences_database.cpp", 37 "src/notification_preferences_info.cpp", 38 "src/notification_rdb_data_mgr.cpp", 39 "src/notification_slot_filter.cpp", 40 "src/notification_subscriber_manager.cpp", 41 "src/permission_filter.cpp", 42 "src/reminder_data_manager.cpp", 43 "src/reminder_event_manager.cpp", 44 "src/reminder_timer_info.cpp", 45 "src/system_event_observer.cpp", 46 ] 47 48 configs = [ 49 ":public_ans_config", 50 "//commonlibrary/c_utils/base:utils_config", 51 ] 52 53 defines = [] 54 cflags = [] 55 56 deps = [ 57 "${ability_runtime_services_path}/abilitymgr:abilityms", 58 "${core_path}:ans_core", 59 "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr", 60 ] 61 62 if (is_double_framework) { 63 cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ] 64 } 65 66 if (distributed_notification_supported) { 67 defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 68 deps += [ "${services_path}/distributed:libans_distributed" ] 69 include_dirs += [ "${services_path}/distributed/include" ] 70 } 71 72 external_deps = [ 73 "ability_runtime:ability_manager", 74 "ability_runtime:wantagent_innerkits", 75 "access_token:libaccesstoken_sdk", 76 "c_utils:utils", 77 "hitrace_native:hitrace_meter", 78 "kv_store:distributeddata_inner", 79 "multimedia_image_framework:image_native", 80 "multimedia_player_framework:media_client", 81 "os_account:os_account_innerkits", 82 "relational_store:native_rdb", 83 "time_service:time_client", 84 "window_manager:libdm", 85 ] 86 external_deps += component_external_deps 87 88 if (device_usage) { 89 external_deps += [ "device_usage_statistics:usagestatsinner" ] 90 defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 91 } 92 93 if (hisysevent_usage) { 94 cflags += [ "-DHAS_HISYSEVENT_PART" ] 95 external_deps += [ "hisysevent_native:libhisysevent" ] 96 } 97 98 subsystem_name = "${subsystem_name}" 99 part_name = "${component_name}" 100} 101