xref: /aosp_15_r20/hardware/interfaces/health/aidl/Android.bp (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
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
24aidl_interface {
25    name: "android.hardware.health",
26    vendor_available: true,
27    recovery_available: true,
28    host_supported: true,
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        },
39    },
40    versions_with_info: [
41        {
42            version: "1",
43            imports: [],
44        },
45        {
46            version: "2",
47            imports: [],
48        },
49        {
50            version: "3",
51            imports: [],
52        },
53    ],
54    frozen: false,
55
56}
57
58cc_defaults {
59    name: "android.hardware.health-translate-ndk_defaults",
60    vendor_available: true,
61    recovery_available: true,
62    host_supported: true,
63    srcs: ["android/hardware/health/translate-ndk.cpp"],
64    shared_libs: [
65        "libbinder_ndk",
66        "libhidlbase",
67        "[email protected]",
68        "[email protected]",
69    ],
70    export_include_dirs: ["include"],
71    export_shared_lib_headers: [
72        "[email protected]",
73        "[email protected]",
74    ],
75    target: {
76        darwin: {
77            enabled: false,
78        },
79    },
80}
81
82cc_library {
83    name: "android.hardware.health-translate-ndk",
84    defaults: ["android.hardware.health-translate-ndk_defaults"],
85    shared_libs: [
86        "android.hardware.health-V4-ndk",
87    ],
88}
89
90// TODO(b/251425963): remove when android.hardware.health is upgraded to V2.
91cc_library {
92    name: "android.hardware.health-translate-V1-ndk",
93    defaults: ["android.hardware.health-translate-ndk_defaults"],
94    shared_libs: [
95        "android.hardware.health-V1-ndk",
96    ],
97}
98
99java_library {
100    name: "android.hardware.health-translate-java",
101    srcs: ["android/hardware/health/Translate.java"],
102    libs: [
103        "android.hardware.health-V4-java",
104        "android.hardware.health-V2.0-java",
105        "android.hardware.health-V2.1-java",
106    ],
107}
108