1# Copyright (c) 2021-2024 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/account/os_account/os_account.gni") 15import("//build/ohos.gni") 16import("//foundation/ability/ability_runtime/ability_runtime.gni") 17import( 18 "//foundation/ability/ability_runtime/services/abilitymgr/abilitymgr.gni") 19import("//foundation/distributeddatamgr/relational_store/relational_store.gni") 20import("//foundation/resourceschedule/background_task_mgr/bgtaskmgr.gni") 21 22group("abilityms_target") { 23 deps = [ 24 ":abilityms", 25 ":ams_service_config", 26 ] 27} 28 29config("abilityms_exception_config") { 30 cflags_cc = [ "-fexceptions" ] 31} 32 33config("abilityms_config") { 34 include_dirs = [ 35 "include/", 36 "${ability_runtime_innerkits_path}/ability_manager/include", 37 "${ability_runtime_services_path}/appdfr/include", 38 "${ability_runtime_innerkits_path}/app_manager/include", 39 "${ability_runtime_innerkits_path}/connectionobs_manager/include", 40 "${ability_runtime_innerkits_path}/deps_wrapper/include", 41 "${ability_base_path}/interfaces/inner_api/base/include", 42 "${ability_base_kits_path}/extractortool/include", 43 "${ability_base_kits_path}/uri/include", 44 "${ability_base_kits_path}/want/include", 45 "${ability_runtime_services_path}/common/include", 46 "//prebuilts/jdk/jdk8/linux-x86/include", 47 "//prebuilts/jdk/jdk8/linux-x86/include/linux", 48 "//third_party/json/include", 49 "${ability_runtime_path}/interfaces/kits/native/ability/native", 50 "${relational_store_innerapi_path}/rdb/include", 51 "${relational_store_innerapi_path}/appdatafwk/include", 52 "${relational_store_innerapi_path}/dataability/include", 53 "${ability_runtime_innerkits_path}/dataobs_manager/include", 54 "${ability_runtime_path}/tools/aa/include", 55 "${os_account_path}/frameworks/common/account_error/include", 56 "${os_account_path}/frameworks/common/database/include", 57 "${os_account_path}/interfaces/innerkits/osaccount/native/include", 58 "${ability_runtime_innerkits_path}/wantagent/include", 59 "${ability_runtime_innerkits_path}/session_handler/include", 60 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime", 61 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper", 62 "${bgtaskmgr_interfaces_path}/innerkits/include", 63 "${bgtaskmgr_frameworks_path}/common/include", 64 "${bgtaskmgr_frameworks_path}/include", 65 "${init_path}/interfaces/innerkits/include/syspara/", 66 "${bundlefwk_inner_api_path}/appexecfwk_core/include", 67 ] 68 69 defines = [] 70 71 if (is_asan) { 72 defines += [ "SUPPORT_ASAN" ] 73 } 74 75 if (ability_command_for_test) { 76 defines += [ "ABILITY_COMMAND_FOR_TEST" ] 77 } 78 79 if (ability_fault_and_exit_test) { 80 defines += [ "ABILITY_FAULT_AND_EXIT_TEST" ] 81 } 82 83 if (ability_runtime_graphics) { 84 include_dirs += [ 85 "${graphic_path}/interfaces/inner_api", 86 "${graphic_path}/utils/color_manager/export", 87 "${multimedia_path}/interfaces/innerkits/include", 88 "${graphic_path}/interfaces/inner_api/wmservice", 89 "${global_path}/i18n/frameworks/intl/include", 90 ] 91 92 defines += [ "SUPPORT_GRAPHICS" ] 93 } 94 95 if (background_task_mgr_continuous_task_enable) { 96 defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ] 97 } 98 99 if (resource_schedule_service_enable) { 100 defines += [ "RESOURCE_SCHEDULE_SERVICE_ENABLE" ] 101 } 102 103 if (efficiency_manager) { 104 defines += [ "EFFICIENCY_MANAGER_ENABLE" ] 105 } 106 107 if (is_asan) { 108 defines += [ "SUPPORT_ASAN" ] 109 } 110 111 cflags = [] 112 if (target_cpu == "arm") { 113 cflags += [ "-DBINDER_IPC_32BIT" ] 114 } 115 cflags += 116 [ "-DKEY_AUTO_FILL_ABILITY=\"${ability_runtime_auto_fill_ability}\"" ] 117} 118 119ohos_shared_library("abilityms") { 120 shlib_type = "sa" 121 sources = abilityms_files 122 cflags_cc = [] 123 configs = [ 124 ":abilityms_config", 125 ":abilityms_exception_config", 126 ] 127 include_dirs = [ "${ability_runtime_services_path}/appdfr/include" ] 128 deps = [ 129 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 130 "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting", 131 "${ability_runtime_innerkits_path}/ability_manager:mission_info", 132 "${ability_runtime_innerkits_path}/app_manager:app_manager", 133 "${ability_runtime_innerkits_path}/connectionobs_manager:connection_obs_manager", 134 "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", 135 "${ability_runtime_innerkits_path}/session_handler:session_handler", 136 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 137 "${ability_runtime_native_path}/ability/native:abilitykit_native", 138 "${ability_runtime_native_path}/ability/native:auto_startup_callback", 139 "${ability_runtime_native_path}/appkit:appkit_manager_helper", 140 "${ability_runtime_path}/utils/global/freeze:freeze_util", 141 "${ability_runtime_services_path}/common:app_util", 142 "${ability_runtime_services_path}/common:event_report", 143 "${ability_runtime_services_path}/common:perm_verification", 144 "${ability_runtime_services_path}/common:task_handler_wrap", 145 "//third_party/icu/icu4c:shared_icuuc", 146 ] 147 148 external_deps = [ 149 "ability_base:base", 150 "ability_base:configuration", 151 "ability_base:session_info", 152 "ability_base:view_data", 153 "ability_base:want", 154 "ability_base:zuri", 155 "access_token:libaccesstoken_sdk", 156 "bundle_framework:appexecfwk_base", 157 "bundle_framework:appexecfwk_core", 158 "bundle_framework:libappexecfwk_common", 159 "c_utils:utils", 160 "common_event_service:cesfwk_core", 161 "common_event_service:cesfwk_innerkits", 162 "config_policy:configpolicy_util", 163 "dsoftbus:softbus_client", 164 "ffrt:libffrt", 165 "hicollie:libhicollie", 166 "hilog:libhilog", 167 "hisysevent:libhisysevent", 168 "hitrace:hitrace_meter", 169 "init:libbeget_proxy", 170 "init:libbegetutil", 171 "ipc:ipc_core", 172 "kv_store:distributeddata_inner", 173 "relational_store:native_dataability", 174 "relational_store:native_rdb", 175 "safwk:system_ability_fwk", 176 "samgr:samgr_proxy", 177 "window_manager:libmodal_system_ui_extension_client", 178 "window_manager:libwsutils", 179 "window_manager:scene_session", 180 "window_manager:sms", 181 ] 182 183 if (background_task_mgr_continuous_task_enable) { 184 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 185 } 186 187 if (resource_schedule_service_enable) { 188 external_deps += [ "resource_schedule_service:ressched_client" ] 189 } 190 191 if (efficiency_manager) { 192 external_deps += [ "efficiency_manager:suspend_manager_client" ] 193 } 194 195 if (os_dlp_part_enabled) { 196 cflags_cc += [ "-DWITH_DLP" ] 197 external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ] 198 } 199 200 if (ability_runtime_graphics) { 201 deps += [ 202 "//third_party/icu/icu4c:shared_icuuc", 203 "//third_party/libjpeg-turbo:turbojpeg_static", 204 ] 205 206 external_deps += [ 207 "ability_base:session_info", 208 "i18n:intl_util", 209 "image_framework:image_native", 210 "input:libmmi-client", 211 "resource_management:global_resmgr", 212 "window_manager:libdm", 213 "window_manager:libmodal_system_ui_extension_client", 214 "window_manager:libwm", 215 "window_manager:libwsutils", 216 "window_manager:scene_session", 217 "window_manager:sms", 218 ] 219 } 220 221 version_script = "libabilityms.map" 222 subsystem_name = "ability" 223 innerapi_tags = [ "platformsdk_indirect" ] 224 part_name = "ability_runtime" 225} 226 227ohos_prebuilt_etc("ams_service_config.json") { 228 source = "resource/ams_service_config.json" 229 subsystem_name = "ability" 230 part_name = "ability_runtime" 231} 232 233ohos_prebuilt_etc("uiextension_picker_config.json") { 234 source = "resource/uiextension_picker_config.json" 235 subsystem_name = "ability" 236 part_name = "ability_runtime" 237} 238 239ohos_prebuilt_etc("proxy_authorization_uri.json") { 240 source = "resource/proxy_authorization_uri.json" 241 subsystem_name = "ability" 242 part_name = "ability_runtime" 243} 244 245group("ams_service_config") { 246 deps = [ 247 ":ams_service_config.json", 248 ":proxy_authorization_uri.json", 249 ":uiextension_picker_config.json", 250 ] 251} 252