• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//build/ohos_var.gni")
16import("//foundation/ability/dmsfwk/dmsfwk.gni")
17
18group("unittest") {
19  testonly = true
20  deps = [ "test:unittest" ]
21}
22
23config("distributed_sched_config") {
24  visibility = [ ":*" ]
25  include_dirs = [ "include" ]
26  defines = []
27  if (dmsfwk_mission_manager) {
28    defines += [ "SUPPORT_DISTRIBUTED_MISSION_MANAGER" ]
29  }
30  if (dmsfwk_report_memmgr || dmsfwk_report_memmgr_plugins) {
31    defines += [ "SUPPORT_DISTRIBUTEDCOMPONENT_TO_MEMMGR" ]
32  }
33  if (dmsfwk_standard_form_share) {
34    defines += [ "SUPPORT_DISTRIBUTED_FORM_SHARE" ]
35  }
36  if (efficiency_manager_service_enable) {
37    defines += [ "EFFICIENCY_MANAGER_ENABLE" ]
38  }
39}
40
41ohos_shared_library("distributedschedsvr") {
42  install_enable = true
43  sources = [
44    "src/ability_connection_wrapper_proxy.cpp",
45    "src/ability_connection_wrapper_stub.cpp",
46    "src/app_connection_stub.cpp",
47    "src/bundle/bundle_manager_callback_stub.cpp",
48    "src/bundle/bundle_manager_internal.cpp",
49    "src/connect_death_recipient.cpp",
50    "src/distributed_sched_adapter.cpp",
51    "src/distributed_sched_continuation.cpp",
52    "src/distributed_sched_dumper.cpp",
53    "src/distributed_sched_permission.cpp",
54    "src/distributed_sched_proxy.cpp",
55    "src/distributed_sched_service.cpp",
56    "src/distributed_sched_stub.cpp",
57    "src/dms_callback_task.cpp",
58    "src/dms_free_install_callback.cpp",
59    "src/dms_free_install_callback_proxy.cpp",
60    "src/dms_free_install_callback_stub.cpp",
61    "src/dms_token_callback.cpp",
62  ]
63
64  configs = [
65    ":distributed_sched_config",
66    "//foundation/ability/dmsfwk/services/dtbschedmgr/test/resource:coverage_flags",
67  ]
68
69  external_deps = [
70    "ability_base:want",
71    "ability_runtime:ability_manager",
72    "access_token:libaccesstoken_sdk",
73    "bundle_framework:appexecfwk_base",
74    "bundle_framework:appexecfwk_core",
75    "c_utils:utils",
76    "device_auth:deviceauth_sdk",
77    "device_manager:devicemanagersdk",
78    "eventhandler:libeventhandler",
79    "hitrace_native:hitrace_meter",
80    "hitrace_native:libhitracechain",
81    "hiviewdfx_hilog_native:libhilog",
82    "init:libbegetutil",
83    "ipc:ipc_core",
84    "kv_store:distributeddata_inner",
85    "os_account:os_account_innerkits",
86    "safwk:system_ability_fwk",
87    "samgr:samgr_proxy",
88  ]
89
90  if (efficiency_manager_service_enable) {
91    external_deps += [ "efficiency_manager:suspend_manager_client" ]
92  }
93
94  deps = [ "//foundation/ability/dmsfwk/services/base:dmsbaseinner" ]
95
96  if (dmsfwk_standard_form_share) {
97    external_deps += [ "form_fwk:form_manager" ]
98    sources += [ "src/form_mgr_death_recipient.cpp" ]
99  }
100
101  if (dmsfwk_mission_manager) {
102    sources += [
103      "src/mission/distributed_data_change_listener.cpp",
104      "src/mission/distributed_data_storage.cpp",
105      "src/mission/distributed_mission_change_listener.cpp",
106      "src/mission/distributed_mission_info.cpp",
107      "src/mission/distributed_sched_mission_manager.cpp",
108      "src/mission/kvstore_death_recipient.cpp",
109      "src/mission/mission_changed_notify.cpp",
110      "src/mission/mission_info_converter.cpp",
111      "src/mission/snapshot.cpp",
112      "src/mission/snapshot_converter.cpp",
113    ]
114    external_deps += [ "multimedia_image_framework:image_native" ]
115  }
116
117  if (dmsfwk_report_memmgr) {
118    external_deps += [ "memmgr:memmgrclient" ]
119  }
120
121  if (dmsfwk_report_memmgr_plugins) {
122    external_deps += [ "memmgr_plugin:memmgrclient" ]
123  }
124
125  install_images = [ system_base_dir ]
126  relative_install_dir = "platformsdk"
127  part_name = "dmsfwk"
128  subsystem_name = "ability"
129}
130