• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17cflags = []
18
19config("bgtaskmgr_public_config") {
20  include_dirs = [ "napi/include" ]
21}
22
23ohos_shared_library("backgroundtaskmanager") {
24  sources = [
25    "napi/src/bg_continuous_task_napi_module.cpp",
26    "napi/src/cancel_suspend_delay.cpp",
27    "napi/src/common.cpp",
28    "napi/src/efficiency_resources_operation.cpp",
29    "napi/src/get_remaining_delay_time.cpp",
30    "napi/src/init.cpp",
31    "napi/src/request_suspend_delay.cpp",
32  ]
33
34  public_configs = [ ":bgtaskmgr_public_config" ]
35
36  deps = [ "${bgtaskmgr_interfaces_path}/innerkits:bgtaskmgr_innerkits" ]
37
38  external_deps = [
39    "ability_base:want",
40    "ability_runtime:ability_context_native",
41    "ability_runtime:abilitykit_native",
42    "ability_runtime:napi_base_context",
43    "ability_runtime:wantagent_innerkits",
44    "bundle_framework:appexecfwk_base",
45    "c_utils:utils",
46    "hiviewdfx_hilog_native:libhilog",
47    "ipc:ipc_core",
48    "napi:ace_napi",
49    "samgr:samgr_proxy",
50  ]
51  relative_install_dir = "module"
52  subsystem_name = "resourceschedule"
53  part_name = "background_task_mgr"
54}
55
56ohos_shared_library("backgroundtaskmanager_napi") {
57  sources = [
58    "napi/src/bg_continuous_task_napi_module.cpp",
59    "napi/src/cancel_suspend_delay.cpp",
60    "napi/src/common.cpp",
61    "napi/src/efficiency_resources_operation.cpp",
62    "napi/src/get_remaining_delay_time.cpp",
63    "napi/src/init_bgtaskmgr.cpp",
64    "napi/src/request_suspend_delay.cpp",
65  ]
66
67  public_configs = [ ":bgtaskmgr_public_config" ]
68
69  deps = [ "${bgtaskmgr_interfaces_path}/innerkits:bgtaskmgr_innerkits" ]
70
71  external_deps = [
72    "ability_base:want",
73    "ability_runtime:ability_context_native",
74    "ability_runtime:abilitykit_native",
75    "ability_runtime:napi_base_context",
76    "ability_runtime:wantagent_innerkits",
77    "bundle_framework:appexecfwk_base",
78    "c_utils:utils",
79    "hiviewdfx_hilog_native:libhilog",
80    "ipc:ipc_core",
81    "napi:ace_napi",
82    "samgr:samgr_proxy",
83  ]
84  relative_install_dir = "module/resourceschedule"
85  subsystem_name = "resourceschedule"
86  part_name = "background_task_mgr"
87}
88