• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//build/ohos.gni")
15import("//foundation/ability/ability_runtime/ability_runtime.gni")
16
17config("appmgr_config") {
18  include_dirs = [
19    "include",
20    "//third_party/json/include",
21    "${ability_runtime_innerkits_path}/ability_manager/include",
22    "${ability_runtime_services_path}/common/include",
23    "${appspawn_path}/interfaces/innerkits/include",
24    "${ability_runtime_path}/tools/aa/include",
25    "${ability_runtime_path}/utils/global/time/include",
26    "${distributeddatamgr_path}/kv_store/interfaces/innerkits/distributeddatamgr/include",
27    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper",
28  ]
29}
30
31group("appms_target") {
32  deps = [ ":libappms" ]
33}
34
35ohos_shared_library("libappms") {
36  shlib_type = "sa"
37  include_dirs = [ "${ability_runtime_services_path}/appdfr/include" ]
38  sources = [
39    "src/ability_running_record.cpp",
40    "src/ams_mgr_scheduler.cpp",
41    "src/app_death_recipient.cpp",
42    "src/app_debug_manager.cpp",
43    "src/app_lifecycle_deal.cpp",
44    "src/app_mgr_service.cpp",
45    "src/app_mgr_service_event_handler.cpp",
46    "src/app_mgr_service_inner.cpp",
47    "src/app_process_manager.cpp",
48    "src/app_running_manager.cpp",
49    "src/app_running_record.cpp",
50    "src/app_running_status_module.cpp",
51    "src/app_spawn_client.cpp",
52    "src/app_spawn_msg_wrapper.cpp",
53    "src/app_spawn_socket.cpp",
54    "src/app_state_observer_manager.cpp",
55    "src/child_process_record.cpp",
56    "src/module_running_record.cpp",
57    "src/quick_fix_callback_with_record.cpp",
58    "src/remote_client_manager.cpp",
59    "src/window_focus_changed_listener.cpp",
60    "src/window_visibility_changed_listener.cpp",
61  ]
62
63  defines = [ "AMS_LOG_TAG = \"AppMgrService\"" ]
64  defines += [ "AMS_LOG_DOMAIN = 0xD001303" ]
65
66  if (product_name != "ohcore") {
67    defines += [ "APP_MGR_SERVICE_APPMS" ]
68  }
69
70  if (ability_command_for_test) {
71    defines += [ "ABILITY_COMMAND_FOR_TEST" ]
72  }
73
74  if (ability_fault_and_exit_test) {
75    defines += [ "ABILITY_FAULT_AND_EXIT_TEST" ]
76  }
77
78  configs = [ ":appmgr_config" ]
79  cflags = []
80  if (target_cpu == "arm") {
81    cflags += [ "-DBINDER_IPC_32BIT" ]
82  }
83  deps = [
84    "${ability_runtime_innerkits_path}/app_manager:app_manager",
85    "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
86    "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
87    "${ability_runtime_native_path}/appkit:appkit_manager_helper",
88    "${ability_runtime_path}/utils/global/freeze:freeze_util",
89    "${ability_runtime_services_path}/common:app_util",
90    "${ability_runtime_services_path}/common:event_report",
91    "${ability_runtime_services_path}/common:perm_verification",
92    "${ability_runtime_services_path}/common:task_handler_wrap",
93  ]
94
95  external_deps = [
96    "ability_base:base",
97    "ability_base:configuration",
98    "ability_base:want",
99    "access_token:libaccesstoken_sdk",
100    "appspawn:appspawn_socket_client",
101    "bundle_framework:appexecfwk_base",
102    "bundle_framework:appexecfwk_core",
103    "common_event_service:cesfwk_innerkits",
104    "ffrt:libffrt",
105    "hicollie:libhicollie",
106    "hilog:libhilog",
107    "hisysevent:libhisysevent",
108    "hitrace:hitrace_meter",
109    "init:libbeget_proxy",
110    "init:libbegetutil",
111    "ipc:ipc_core",
112    "kv_store:distributeddata_mgr",
113    "memory_utils:libmeminfo",
114    "safwk:system_ability_fwk",
115    "samgr:samgr_proxy",
116  ]
117
118  if (product_name != "ohcore") {
119    external_deps += [ "netmanager_base:net_conn_manager_if" ]
120  }
121
122  if (ability_runtime_graphics) {
123    defines += [ "SUPPORT_GRAPHICS" ]
124    deps += []
125    external_deps += [
126      "i18n:intl_util",
127      "window_manager:libwm",
128      "window_manager:libwsutils",
129    ]
130  }
131
132  if (background_task_mgr_continuous_task_enable) {
133    defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ]
134  }
135
136  if (is_asan) {
137    defines += [ "SUPPORT_ASAN" ]
138  }
139
140  version_script = "libappms.map"
141  subsystem_name = "ability"
142  part_name = "ability_runtime"
143}
144