1# Copyright (c) 2021-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("../../batterymgr.gni") 15 16ohos_shared_library("batteryinfo") { 17 sources = [ 18 "battery_info.cpp", 19 "napi_utils.cpp", 20 ] 21 configs = [ "${battery_utils}:utils_config" ] 22 deps = [ "${battery_inner_api}:batterysrv_client" ] 23 external_deps = [ 24 "c_utils:utils", 25 "hilog:libhilog", 26 "napi:ace_napi", 27 ] 28 29 relative_install_dir = "module" 30 31 subsystem_name = "powermgr" 32 part_name = "battery_manager" 33} 34 35ohos_shared_library("charger") { 36 sources = [ "charger.cpp" ] 37 configs = [ 38 "${battery_utils}:utils_config", 39 "${battery_utils}:coverage_flags", 40 ] 41 deps = [ "${battery_inner_api}:batterysrv_client" ] 42 external_deps = [ 43 "c_utils:utils", 44 "hilog:libhilog", 45 "napi:ace_napi", 46 ] 47 48 relative_install_dir = "module" 49 50 subsystem_name = "powermgr" 51 part_name = "battery_manager" 52} 53 54ohos_shared_library("battery") { 55 sources = [ "system_battery.cpp" ] 56 configs = [ 57 "${battery_utils}:utils_config", 58 "${battery_utils}:coverage_flags", 59 ] 60 deps = [ "${battery_inner_api}:batterysrv_client" ] 61 external_deps = [ 62 "c_utils:utils", 63 "hilog:libhilog", 64 "napi:ace_napi", 65 ] 66 67 relative_install_dir = "module" 68 69 subsystem_name = "powermgr" 70 part_name = "battery_manager" 71} 72