• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020 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.
13import("//build/lite/config/component/lite_component.gni")
14import("//build/lite/config/subsystem/aafwk/config.gni")
15import("//build/lite/config/test.gni")
16
17lite_library("abilitymanager") {
18  if (ohos_kernel_type == "liteos_m") {
19    target_type = "static_library"
20
21    sources = [
22      "src/slite/ability_manager.cpp",
23      "src/slite/ability_manager_inner.cpp",
24      "src/slite/abilityms_slite_client.cpp",
25    ]
26
27    deps = [
28      "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
29      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static",
30      "//foundation/arkui/ace_engine_lite/frameworks:ace_lite",
31    ]
32  } else {
33    target_type = "shared_library"
34
35    sources = [
36      "src/ability_callback_utils.cpp",
37      "src/ability_manager.cpp",
38      "src/ability_self_callback.cpp",
39      "src/ability_service_manager.cpp",
40      "src/abilityms_client.cpp",
41    ]
42
43    deps = [
44      "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
45      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
46      "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
47    ]
48
49    defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ]
50  }
51
52  include_dirs = [
53    "${aafwk_lite_path}/services/abilitymgr_lite/include",
54    "${aafwk_lite_path}/services/abilitymgr_lite/include/util",
55    "${aafwk_lite_path}/frameworks/abilitymgr_lite/include",
56    "${aafwk_lite_path}/frameworks/want_lite/include",
57    "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
58    "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite/slite",
59    "${aafwk_lite_path}/interfaces/kits/want_lite",
60    "${aafwk_lite_path}/interfaces/kits/ability_lite",
61    "${aafwk_lite_path}/interfaces/kits/ability_lite/slite",
62    "${appexecfwk_lite_path}/utils/bundle_lite",
63    "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
64    "${appexecfwk_lite_path}/frameworks/bundle_lite/include",
65    "//commonlibrary/utils_lite/include",
66    "//commonlibrary/utils_lite/memory/include",
67    "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include",
68    "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store/include",
69    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
70    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
71    "//third_party/bounds_checking_function/include",
72    "./include",
73    "./",
74  ]
75
76  if (ohos_kernel_type == "liteos_m") {
77    include_dirs +=
78        [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite" ]
79  }
80}
81
82unittest("ability_manager_inner_test") {
83  output_extension = "bin"
84  output_dir = "$root_out_dir/test/unittest/ManagerInnerTest_lv0"
85
86  sources = [ "//foundation/ability/ability_lite/frameworks/abilitymgr_lite/unittest/ability_manager_inner_test.cpp" ]
87}
88
89lite_component("aafwk_abilityManager_lite") {
90  features = [ ":abilitymanager" ]
91}
92