xref: /aosp_15_r20/system/security/keystore2/aidl/Android.bp (revision e1997b9af69e3155ead6e072d106a0077849ffba)
1// Copyright 2020, 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 "system_security_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["system_security_license"],
22}
23
24aidl_interface {
25    name: "android.security.authorization",
26    srcs: ["android/security/authorization/*.aidl"],
27    defaults: ["android.hardware.security.keymint-latest-defaults"],
28    imports: [
29        "android.hardware.security.secureclock-V1",
30    ],
31    unstable: true,
32    backend: {
33        java: {
34            platform_apis: true,
35        },
36        rust: {
37            enabled: true,
38        },
39        ndk: {
40            enabled: true,
41            apps_enabled: false,
42        },
43    },
44}
45
46aidl_interface {
47    name: "android.security.apc",
48    srcs: ["android/security/apc/*.aidl"],
49    unstable: true,
50    backend: {
51        java: {
52            enabled: true,
53        },
54        rust: {
55            enabled: true,
56        },
57        ndk: {
58            enabled: true,
59        },
60    },
61}
62
63aidl_interface {
64    name: "android.security.compat",
65    srcs: ["android/security/compat/*.aidl"],
66    defaults: ["android.hardware.security.keymint-latest-defaults"],
67    imports: [
68        "android.hardware.security.secureclock-V1",
69        "android.hardware.security.sharedsecret-V1",
70    ],
71    unstable: true,
72    backend: {
73        java: {
74            platform_apis: true,
75        },
76        rust: {
77            enabled: true,
78        },
79        ndk: {
80            enabled: true,
81            apps_enabled: false,
82        },
83    },
84}
85
86aidl_interface {
87    name: "android.security.maintenance",
88    srcs: ["android/security/maintenance/*.aidl"],
89    defaults: [
90        "android.system.keystore2-latest-defaults",
91    ],
92    unstable: true,
93    backend: {
94        java: {
95            platform_apis: true,
96        },
97        rust: {
98            enabled: true,
99        },
100        ndk: {
101            enabled: true,
102            apps_enabled: false,
103        },
104    },
105}
106
107aidl_interface {
108    name: "android.security.legacykeystore",
109    srcs: ["android/security/legacykeystore/*.aidl"],
110    unstable: true,
111    backend: {
112        java: {
113            platform_apis: true,
114        },
115        rust: {
116            enabled: true,
117        },
118        ndk: {
119            enabled: true,
120            apps_enabled: false,
121        },
122    },
123}
124
125aidl_interface {
126    name: "android.security.postprocessor",
127    srcs: ["android/security/postprocessor/*.aidl"],
128    unstable: true,
129    backend: {
130        java: {
131            enabled: false,
132        },
133        cpp: {
134            enabled: false,
135        },
136        ndk: {
137            enabled: false,
138        },
139        rust: {
140            enabled: true,
141        },
142    },
143}
144
145aidl_interface {
146    name: "android.security.metrics",
147    srcs: ["android/security/metrics/*.aidl"],
148    defaults: [
149        "android.system.keystore2-latest-defaults",
150    ],
151    unstable: true,
152    backend: {
153        java: {
154            platform_apis: true,
155        },
156        rust: {
157            enabled: true,
158        },
159        ndk: {
160            enabled: true,
161            apps_enabled: false,
162        },
163    },
164}
165
166// java_defaults that includes the latest Keystore2 AIDL library.
167// Modules that depend on KeyMint directly can include this java_defaults to avoid
168// managing dependency versions explicitly.
169java_defaults {
170    name: "keystore2_use_latest_aidl_java_static",
171    static_libs: [
172        "android.system.keystore2-V5-java-source",
173    ],
174}
175
176java_defaults {
177    name: "keystore2_use_latest_aidl_java_shared",
178    libs: [
179        "android.system.keystore2-V5-java-source",
180    ],
181}
182
183java_defaults {
184    name: "keystore2_use_latest_aidl_java",
185    libs: [
186        "android.system.keystore2-V5-java",
187    ],
188}
189
190// cc_defaults that includes the latest Keystore2 AIDL library.
191// Modules that depend on KeyMint directly can include this cc_defaults to avoid
192// managing dependency versions explicitly.
193cc_defaults {
194    name: "keystore2_use_latest_aidl_ndk_static",
195    static_libs: [
196        "android.system.keystore2-V5-ndk",
197    ],
198}
199
200cc_defaults {
201    name: "keystore2_use_latest_aidl_ndk_shared",
202    shared_libs: [
203        "android.system.keystore2-V5-ndk",
204    ],
205}
206
207cc_defaults {
208    name: "keystore2_use_latest_aidl_cpp_shared",
209    shared_libs: [
210        "android.system.keystore2-V5-cpp",
211    ],
212}
213
214cc_defaults {
215    name: "keystore2_use_latest_aidl_cpp_static",
216    static_libs: [
217        "android.system.keystore2-V5-cpp",
218    ],
219}
220
221// A rust_defaults that includes the latest Keystore2 AIDL library.
222// Modules that depend on Keystore2 directly can include this rust_defaults to avoid
223// managing dependency versions explicitly.
224rust_defaults {
225    name: "keystore2_use_latest_aidl_rust",
226    rustlibs: [
227        "android.system.keystore2-V5-rust",
228    ],
229}
230