1// Copyright (C) 2021 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "hardware_interfaces_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["hardware_interfaces_license"], 22} 23 24cc_defaults { 25 name: "libhealthshim_defaults", 26 host_supported: true, // for testing 27 target: { 28 darwin: { 29 enabled: false, 30 }, 31 }, 32 cflags: [ 33 "-Wall", 34 "-Werror", 35 ], 36 static_libs: [ 37 "android.hardware.health-V3-ndk", 38 "android.hardware.health-translate-ndk", 39 "android.hardware.health@1.0", 40 "android.hardware.health@2.0", 41 ], 42 shared_libs: [ 43 // These can be expected from the device or from host. 44 "libbase", 45 "libbinder_ndk", 46 "libcutils", 47 "libhidlbase", 48 "liblog", 49 "libutils", 50 ], 51} 52 53// Shim library that wraps a HIDL IHealth object into an AIDL IHealth object. 54cc_library_static { 55 name: "libhealthshim", 56 defaults: ["libhealthshim_defaults"], 57 recovery_available: true, 58 srcs: [ 59 "shim.cpp", 60 ], 61 export_include_dirs: [ 62 "include", 63 ], 64} 65 66cc_test { 67 name: "libhealthshim_test", 68 defaults: ["libhealthshim_defaults"], 69 static_libs: [ 70 "libhealthshim", 71 "libgmock", 72 ], 73 tidy_timeout_srcs: [ 74 "test.cpp", 75 ], 76 srcs: [ 77 "test.cpp", 78 ], 79 test_suites: ["general-tests"], 80 test_options: { 81 unit_test: true, 82 }, 83} 84