Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 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 | |
Bob Badour | a88d5b1 | 2021-10-28 17:18:27 -0700 | [diff] [blame] | 15 | package { |
| 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 | |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 24 | aidl_interface { |
| 25 | name: "android.hardware.health", |
| 26 | vendor_available: true, |
Yifan Hong | e32a8ea | 2021-10-20 21:54:20 -0700 | [diff] [blame] | 27 | recovery_available: true, |
Yifan Hong | 7a6956e | 2021-11-08 23:52:44 -0800 | [diff] [blame] | 28 | host_supported: true, |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 29 | srcs: ["android/hardware/health/*.aidl"], |
| 30 | stability: "vintf", |
| 31 | backend: { |
| 32 | cpp: { |
| 33 | enabled: false, |
| 34 | }, |
| 35 | java: { |
| 36 | enabled: true, |
| 37 | sdk_version: "module_current", |
| 38 | }, |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 39 | }, |
Jiyong Park | 70f5837 | 2022-04-16 07:03:24 +0900 | [diff] [blame] | 40 | versions_with_info: [ |
| 41 | { |
| 42 | version: "1", |
| 43 | imports: [], |
| 44 | }, |
Alex Buynytskyy | ec1198d | 2023-04-04 19:52:27 +0000 | [diff] [blame] | 45 | { |
| 46 | version: "2", |
| 47 | imports: [], |
| 48 | }, |
| 49 | |
Jiyong Park | 70f5837 | 2022-04-16 07:03:24 +0900 | [diff] [blame] | 50 | ], |
David Anderson | 85b3b03 | 2023-12-05 21:34:32 -0800 | [diff] [blame] | 51 | frozen: false, |
Jiyong Park | 70f5837 | 2022-04-16 07:03:24 +0900 | [diff] [blame] | 52 | |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 53 | } |
| 54 | |
Jack Wu | 0edf57e | 2023-01-10 14:56:13 +0800 | [diff] [blame] | 55 | cc_defaults { |
| 56 | name: "android.hardware.health-translate-ndk_defaults", |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 57 | vendor_available: true, |
Yifan Hong | e32a8ea | 2021-10-20 21:54:20 -0700 | [diff] [blame] | 58 | recovery_available: true, |
Yifan Hong | 7a6956e | 2021-11-08 23:52:44 -0800 | [diff] [blame] | 59 | host_supported: true, |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 60 | srcs: ["android/hardware/health/translate-ndk.cpp"], |
| 61 | shared_libs: [ |
| 62 | "libbinder_ndk", |
| 63 | "libhidlbase", |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 64 | "android.hardware.health@2.0", |
| 65 | "android.hardware.health@2.1", |
| 66 | ], |
| 67 | export_include_dirs: ["include"], |
| 68 | export_shared_lib_headers: [ |
| 69 | "android.hardware.health@2.0", |
| 70 | "android.hardware.health@2.1", |
| 71 | ], |
Steven Moreland | 738d3d5 | 2022-01-07 22:15:32 +0000 | [diff] [blame] | 72 | target: { |
| 73 | darwin: { |
| 74 | enabled: false, |
| 75 | }, |
| 76 | }, |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 77 | } |
| 78 | |
Jack Wu | 0edf57e | 2023-01-10 14:56:13 +0800 | [diff] [blame] | 79 | cc_library { |
| 80 | name: "android.hardware.health-translate-ndk", |
| 81 | defaults: ["android.hardware.health-translate-ndk_defaults"], |
| 82 | shared_libs: [ |
David Anderson | 85b3b03 | 2023-12-05 21:34:32 -0800 | [diff] [blame] | 83 | "android.hardware.health-V3-ndk", |
Jack Wu | 0edf57e | 2023-01-10 14:56:13 +0800 | [diff] [blame] | 84 | ], |
| 85 | } |
| 86 | |
| 87 | // TODO(b/251425963): remove when android.hardware.health is upgraded to V2. |
| 88 | cc_library { |
| 89 | name: "android.hardware.health-translate-V1-ndk", |
| 90 | defaults: ["android.hardware.health-translate-ndk_defaults"], |
| 91 | shared_libs: [ |
| 92 | "android.hardware.health-V1-ndk", |
| 93 | ], |
| 94 | } |
| 95 | |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 96 | java_library { |
| 97 | name: "android.hardware.health-translate-java", |
| 98 | srcs: ["android/hardware/health/Translate.java"], |
| 99 | libs: [ |
David Anderson | 85b3b03 | 2023-12-05 21:34:32 -0800 | [diff] [blame] | 100 | "android.hardware.health-V3-java", |
Yifan Hong | 52ecb3f | 2021-01-11 17:04:33 -0800 | [diff] [blame] | 101 | "android.hardware.health-V2.0-java", |
| 102 | "android.hardware.health-V2.1-java", |
| 103 | ], |
| 104 | } |