xref: /aosp_15_r20/system/secretkeeper/hal/Android.bp (revision 3f8e9d82f4020c68ad19a99fc5fdc1fc90b79379)
1*3f8e9d82SAndroid Build Coastguard Worker// Copyright 2023, The Android Open Source Project
2*3f8e9d82SAndroid Build Coastguard Worker//
3*3f8e9d82SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*3f8e9d82SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*3f8e9d82SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*3f8e9d82SAndroid Build Coastguard Worker//
7*3f8e9d82SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*3f8e9d82SAndroid Build Coastguard Worker//
9*3f8e9d82SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*3f8e9d82SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*3f8e9d82SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*3f8e9d82SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*3f8e9d82SAndroid Build Coastguard Worker// limitations under the License.
14*3f8e9d82SAndroid Build Coastguard Worker
15*3f8e9d82SAndroid Build Coastguard Workerpackage {
16*3f8e9d82SAndroid Build Coastguard Worker    default_applicable_licenses: ["system_secretkeeper_license"],
17*3f8e9d82SAndroid Build Coastguard Worker}
18*3f8e9d82SAndroid Build Coastguard Worker
19*3f8e9d82SAndroid Build Coastguard Workerrust_defaults {
20*3f8e9d82SAndroid Build Coastguard Worker    name: "libsecretkeeper_hal_defaults",
21*3f8e9d82SAndroid Build Coastguard Worker    crate_name: "secretkeeper_hal",
22*3f8e9d82SAndroid Build Coastguard Worker    srcs: ["src/lib.rs"],
23*3f8e9d82SAndroid Build Coastguard Worker    vendor_available: true,
24*3f8e9d82SAndroid Build Coastguard Worker    defaults: [
25*3f8e9d82SAndroid Build Coastguard Worker        "authgraph_use_latest_hal_aidl_rust",
26*3f8e9d82SAndroid Build Coastguard Worker    ],
27*3f8e9d82SAndroid Build Coastguard Worker    rustlibs: [
28*3f8e9d82SAndroid Build Coastguard Worker        "libauthgraph_hal",
29*3f8e9d82SAndroid Build Coastguard Worker        "libbinder_rs",
30*3f8e9d82SAndroid Build Coastguard Worker        "libcoset",
31*3f8e9d82SAndroid Build Coastguard Worker        "liblog_rust",
32*3f8e9d82SAndroid Build Coastguard Worker        "libsecretkeeper_comm_nostd",
33*3f8e9d82SAndroid Build Coastguard Worker    ],
34*3f8e9d82SAndroid Build Coastguard Worker}
35*3f8e9d82SAndroid Build Coastguard Worker
36*3f8e9d82SAndroid Build Coastguard Workerrust_library {
37*3f8e9d82SAndroid Build Coastguard Worker    name: "libsecretkeeper_hal",
38*3f8e9d82SAndroid Build Coastguard Worker    defaults: [
39*3f8e9d82SAndroid Build Coastguard Worker        "libsecretkeeper_hal_defaults",
40*3f8e9d82SAndroid Build Coastguard Worker        "secretkeeper_use_latest_hal_aidl_rust",
41*3f8e9d82SAndroid Build Coastguard Worker    ],
42*3f8e9d82SAndroid Build Coastguard Worker    features: [
43*3f8e9d82SAndroid Build Coastguard Worker        "hal_v2",
44*3f8e9d82SAndroid Build Coastguard Worker    ],
45*3f8e9d82SAndroid Build Coastguard Worker}
46*3f8e9d82SAndroid Build Coastguard Worker
47*3f8e9d82SAndroid Build Coastguard Workerrust_library {
48*3f8e9d82SAndroid Build Coastguard Worker    name: "libsecretkeeper_hal_v1",
49*3f8e9d82SAndroid Build Coastguard Worker    defaults: [
50*3f8e9d82SAndroid Build Coastguard Worker        "libsecretkeeper_hal_defaults",
51*3f8e9d82SAndroid Build Coastguard Worker    ],
52*3f8e9d82SAndroid Build Coastguard Worker    rustlibs: [
53*3f8e9d82SAndroid Build Coastguard Worker        "android.hardware.security.secretkeeper-V1-rust",
54*3f8e9d82SAndroid Build Coastguard Worker    ],
55*3f8e9d82SAndroid Build Coastguard Worker}
56