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 16config("usage_report_config") { 17 visibility = [ "*:*" ] 18 include_dirs = [ 19 "../cache/include", 20 "../event/include", 21 "../include", 22 "//base/powermgr/battery_statistics/utils/native/include", 23 "factory/include", 24 "include", 25 ] 26} 27 28ohos_executable("usage_report") { 29 configs = [ ":usage_report_config" ] 30 31 sources = [ 32 "../cache/event_db_helper.cpp", 33 "../cache/json_parser.cpp", 34 "../cache/usage_event_cacher.cpp", 35 "../event/app_usage_event.cpp", 36 "../event/sys_usage_event.cpp", 37 "factory/app_usage_event_factory.cpp", 38 "factory/sys_usage_event_factory.cpp", 39 "main.cpp", 40 "usage_event_report_service.cpp", 41 ] 42 43 deps = [ 44 "$hiview_adapter/utility:hiview_adapter_utility", 45 "$hiview_base:hiviewbase", 46 "//third_party/jsoncpp:jsoncpp", 47 ] 48 49 external_deps = [ 50 "ability_runtime:wantagent_innerkits", 51 "battery_statistics:batterystats_client", 52 "bundle_framework:appexecfwk_base", 53 "bundle_framework:appexecfwk_core", 54 "c_utils:utils", 55 "hilog_native:libhilog", 56 "hisysevent_native:libhisysevent", 57 "ipc:ipc_core", 58 "os_account:os_account_innerkits", 59 "time_service:time_client", 60 ] 61 62 defines = [] 63 if (device_usage_statistics_enable) { 64 external_deps += [ "device_usage_statistics:usagestatsinner" ] 65 defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 66 } 67 68 part_name = "hiview" 69 subsystem_name = "hiviewdfx" 70} 71