• 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.
13import("//base/hiviewdfx/hiview/hiview.gni")
14import("//build/ohos.gni")
15
16if (enable_hiview_usage_event_report_build) {
17  config("usage_event_report_config") {
18    visibility = [ "*:*" ]
19    include_dirs = [
20      "cache/include",
21      "event/include",
22      "idl/include",
23      "include",
24    ]
25  }
26
27  ohos_source_set("usage_event_report") {
28    configs = [ ":usage_event_report_config" ]
29
30    sources = [
31      "cache/event_db_helper.cpp",
32      "cache/json_parser.cpp",
33      "cache/usage_event_cacher.cpp",
34      "event/sys_usage_event.cpp",
35      "idl/hiview_shutdown_callback.cpp",
36      "idl/hiview_shutdown_callback_proxy.cpp",
37      "idl/hiview_shutdown_callback_stub.cpp",
38      "usage_event_report.cpp",
39    ]
40
41    deps = [
42      "$hiview_adapter/utility:hiview_adapter_utility",
43      "$hiview_base:hiviewbase",
44      "//third_party/bounds_checking_function:libsec_shared",
45      "//third_party/jsoncpp:jsoncpp",
46    ]
47
48    external_deps = [
49      "hilog_native:libhilog",
50      "hisysevent_native:libhisysevent",
51    "ipc:ipc_core",
52      "power_manager:powermgr_client",
53    ]
54  }
55} else {
56  ohos_source_set("usage_event_report") {
57  }
58}
59
60group("unittest") {
61  testonly = true
62  deps = []
63}
64
65group("moduletest") {
66  testonly = true
67  deps = []
68}
69