1# Copyright (c) 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/resourceschedule/background_task_mgr/bgtaskmgr.gni")
16
17config("bgtaskmgr_innerkits_public_config") {
18  include_dirs = [
19    "include",
20    "${bgtaskmgr_frameworks_path}/common/include",
21    "${bgtaskmgr_frameworks_path}/include",
22  ]
23}
24
25ohos_shared_library("bgtaskmgr_innerkits") {
26  branch_protector_ret = "pac_ret"
27  sanitize = {
28    cfi = true
29    cfi_cross_dso = true
30    debug = false
31  }
32  sources = [
33    "${bgtaskmgr_frameworks_path}/src/background_task_manager.cpp",
34    "${bgtaskmgr_frameworks_path}/src/background_task_mgr_proxy.cpp",
35    "${bgtaskmgr_frameworks_path}/src/background_task_subscriber_proxy.cpp",
36    "${bgtaskmgr_frameworks_path}/src/background_task_subscriber_stub.cpp",
37    "${bgtaskmgr_frameworks_path}/src/expired_callback_stub.cpp",
38    "src/background_task_mgr_helper.cpp",
39    "src/background_task_subscriber.cpp",
40    "src/continuous_task_callback_info.cpp",
41    "src/continuous_task_param.cpp",
42    "src/delay_suspend_info.cpp",
43    "src/efficiency_resource_info.cpp",
44    "src/expired_callback.cpp",
45    "src/resource_callback_info.cpp",
46    "src/resource_type.cpp",
47    "src/transient_task_app_info.cpp",
48  ]
49
50  public_configs = [ ":bgtaskmgr_innerkits_public_config" ]
51
52  external_deps = [
53    "ability_runtime:wantagent_innerkits",
54    "c_utils:utils",
55    "common_event_service:cesfwk_innerkits",
56    "hilog:libhilog",
57    "hitrace:hitrace_meter",
58    "ipc:ipc_single",
59    "samgr:samgr_proxy",
60  ]
61
62  public_external_deps = [ "json:nlohmann_json_static" ]
63
64  subsystem_name = "resourceschedule"
65  part_name = "background_task_mgr"
66  innerapi_tags = [ "platformsdk" ]
67  version_script = "libbgtaskmgr_innerkits.versionscript"
68}
69