1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21rust_defaults { 22 name: "libsecretkeeper_client.defaults", 23 crate_name: "secretkeeper_client", 24 edition: "2021", 25 lints: "android", 26 defaults: [ 27 "authgraph_use_latest_hal_aidl_rust", 28 "secretkeeper_use_latest_hal_aidl_rust", 29 ], 30 rustlibs: [ 31 "libauthgraph_core", 32 "libauthgraph_boringssl", 33 "libauthgraph_wire", 34 "libbinder_rs", 35 "libciborium", 36 "libcoset", 37 "libhex", 38 "libdiced_open_dice", 39 // TODO(b/315464358): Use the std version 40 "libsecretkeeper_comm_nostd", 41 // TODO(b/291228655): This is required for 'cipher', refactor to cut this dependency. 42 "libsecretkeeper_core_nostd", 43 ], 44} 45 46rust_library { 47 name: "libsecretkeeper_client", 48 defaults: ["libsecretkeeper_client.defaults"], 49 srcs: ["src/lib.rs"], 50} 51 52rust_test { 53 name: "libsecretkeeper_client.test", 54 defaults: [ 55 "libsecretkeeper_client.defaults", 56 "rdroidtest.defaults", 57 ], 58 srcs: ["src/lib.rs"], 59 rustlibs: [ 60 "libhex", 61 ], 62 test_suites: ["general-tests"], 63 data: ["testdata/*"], 64} 65