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("//foundation/ability/ability_runtime/ability_runtime.gni") 16import( 17 "//foundation/ability/ability_runtime/services/abilitymgr/abilitymgr.gni") 18import("//foundation/distributeddatamgr/relational_store/relational_store.gni") 19import("//foundation/resourceschedule/background_task_mgr/bgtaskmgr.gni") 20 21group("abilityms_target") { 22 deps = [ 23 ":abilityms", 24 ":ams_service_config", 25 ] 26} 27 28config("abilityms_exception_config") { 29 cflags_cc = [ "-fexceptions" ] 30} 31 32config("abilityms_config") { 33 include_dirs = [ 34 "include/", 35 "${ability_runtime_innerkits_path}/ability_manager/include", 36 "${ability_runtime_innerkits_path}/app_manager/include", 37 "${ability_runtime_innerkits_path}/connectionobs_manager/include", 38 "${ability_base_path}/interfaces/inner_api/base/include", 39 "${ability_base_kits_path}/uri/include", 40 "${ability_base_kits_path}/want/include", 41 "${ability_runtime_services_path}/common/include", 42 "//prebuilts/jdk/jdk8/linux-x86/include", 43 "//prebuilts/jdk/jdk8/linux-x86/include/linux", 44 "//third_party/json/include", 45 "${ability_runtime_path}/interfaces/kits/native/ability/native", 46 "${relational_store_innerapi_path}/rdb/include", 47 "${relational_store_innerapi_path}/appdatafwk/include", 48 "${relational_store_innerapi_path}/dataability/include", 49 "${ability_runtime_innerkits_path}/dataobs_manager/include", 50 "${ability_runtime_path}/tools/aa/include", 51 "//base/account/os_account/frameworks/common/account_error/include", 52 "//base/account/os_account/frameworks/common/database/include", 53 "//base/account/os_account/interfaces/innerkits/osaccount/native/include", 54 "${ability_runtime_innerkits_path}/wantagent/include", 55 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime", 56 "${bgtaskmgr_interfaces_path}/innerkits/include", 57 "${bgtaskmgr_frameworks_path}/common/include", 58 "${bgtaskmgr_frameworks_path}/include", 59 "${init_path}/interfaces/innerkits/include/syspara/", 60 "${bundlefwk_inner_api_path}/appexecfwk_core/include", 61 ] 62 63 defines = [] 64 65 if (is_asan) { 66 defines += [ "SUPPORT_ASAN" ] 67 } 68 69 if (ability_command_for_test) { 70 defines += [ "ABILITY_COMMAND_FOR_TEST" ] 71 } 72 73 if (ability_runtime_graphics) { 74 include_dirs += [ 75 "${graphic_path}/interfaces/inner_api", 76 "${multimedia_path}/interfaces/innerkits/include", 77 "${graphic_path}/interfaces/inner_api/wmservice", 78 "${global_path}/i18n/frameworks/intl/include", 79 ] 80 81 defines += [ "SUPPORT_GRAPHICS" ] 82 } 83 84 if (background_task_mgr_continuous_task_enable) { 85 defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ] 86 } 87 88 if (resource_schedule_service_enable) { 89 defines += [ "RESOURCE_SCHEDULE_SERVICE_ENABLE" ] 90 } 91 92 if (efficiency_manager) { 93 defines += [ "EFFICIENCY_MANAGER_ENABLE" ] 94 } 95 96 if (is_asan) { 97 defines += [ "SUPPORT_ASAN" ] 98 } 99 100 cflags = [] 101 if (target_cpu == "arm") { 102 cflags += [ "-DBINDER_IPC_32BIT" ] 103 } 104} 105 106ohos_shared_library("abilityms") { 107 sources = abilityms_files 108 sources += [ "src/sa_mgr_client.cpp" ] 109 cflags_cc = [] 110 configs = [ 111 ":abilityms_config", 112 ":abilityms_exception_config", 113 ] 114 deps = [ 115 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 116 "${ability_runtime_services_path}/common:event_report", 117 "${ability_runtime_services_path}/common:perm_verification", 118 "${ability_runtime_services_path}/dialog_ui/dialog_anr/js:dialog_anr_js_files_etc", 119 "${ability_runtime_services_path}/dialog_ui/dialog_selector/js:dialog_selector_js_files_etc", 120 "${ability_runtime_services_path}/dialog_ui/dialog_tips/js:dialog_tips_js_files_etc", 121 "//third_party/icu/icu4c:shared_icuuc", 122 ] 123 124 external_deps = [ 125 "ability_base:configuration", 126 "ability_base:want", 127 "ability_base:zuri", 128 "ability_runtime:ability_deps_wrapper", 129 "ability_runtime:ability_manager", 130 "ability_runtime:abilitykit_native", 131 "ability_runtime:app_manager", 132 "ability_runtime:connection_obs_manager", 133 "access_token:libaccesstoken_sdk", 134 "bundle_framework:appexecfwk_base", 135 "bundle_framework:appexecfwk_core", 136 "c_utils:utils", 137 "common_event_service:cesfwk_core", 138 "common_event_service:cesfwk_innerkits", 139 "dsoftbus:softbus_client", 140 "eventhandler:libeventhandler", 141 "hicollie_native:libhicollie", 142 "hisysevent_native:libhisysevent", 143 "hitrace_native:hitrace_meter", 144 "hiviewdfx_hilog_native:libhilog", 145 "init:libbeget_proxy", 146 "init:libbegetutil", 147 "ipc:ipc_core", 148 "relational_store:native_dataability", 149 "relational_store:native_rdb", 150 "safwk:system_ability_fwk", 151 "samgr:samgr_proxy", 152 ] 153 154 if (background_task_mgr_continuous_task_enable) { 155 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 156 } 157 158 if (resource_schedule_service_enable) { 159 external_deps += [ "resource_schedule_service:ressched_client" ] 160 } 161 162 if (efficiency_manager) { 163 external_deps += [ "efficiency_manager:suspend_manager_client" ] 164 } 165 166 if (os_dlp_part_enabled) { 167 cflags_cc += [ "-DWITH_DLP" ] 168 external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ] 169 } 170 171 if (ability_runtime_graphics) { 172 deps += [ 173 "${ace_engine_path}/interfaces/inner_api/ui_service_manager:ui_service_mgr", 174 "//third_party/icu/icu4c:shared_icuuc", 175 "//third_party/libjpeg-turbo:turbojpeg_static", 176 ] 177 public_deps = 178 [ "${global_path}/resource_management/frameworks/resmgr:global_resmgr" ] 179 external_deps += [ 180 "i18n:intl_util", 181 "input:libmmi-client", 182 "multimedia_image_framework:image_native", 183 "window_manager:libdm", 184 ] 185 } 186 187 version_script = "libabilityms.map" 188 subsystem_name = "ability" 189 part_name = "ability_runtime" 190} 191 192ohos_prebuilt_etc("ams_service_config.json") { 193 source = "resource/ams_service_config.json" 194 subsystem_name = "ability" 195 part_name = "ability_runtime" 196} 197 198group("ams_service_config") { 199 deps = [ ":ams_service_config.json" ] 200} 201