blob: 338f37e5522cdbb63a2963af1592063028a0d2d6 [file] [log] [blame]
Janis Danisevskis43c89712020-08-03 23:42:42 +00001// 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
15rust_library {
16 name: "libkeystore2",
17 crate_name: "keystore2",
18 srcs: ["src/lib.rs"],
Janis Danisevskis7d77a762020-07-20 13:03:31 -070019
20 rustlibs: [
Janis Danisevskise24f3472020-08-12 17:58:49 -070021 "libandroid_hardware_keymint",
Janis Danisevskis1b3a6e22020-08-07 12:39:56 -070022 "libandroid_security_keystore2",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070023 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070024 "libbinder_rs",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070025 "libkeystore_aidl_generated",
Janis Danisevskisce995432020-07-21 12:22:34 -070026 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000027 "liblazy_static",
Joel Galenson0891bc12020-07-20 10:37:03 -070028 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070029 "liblog_rust",
Joel Galenson0891bc12020-07-20 10:37:03 -070030 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070031 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070032 "libthiserror",
33 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000034}
35
36rust_test {
37 name: "keystore2_test",
Joel Galenson26f4d012020-07-17 14:57:21 -070038 crate_name: "keystore2",
Janis Danisevskis43c89712020-08-03 23:42:42 +000039 srcs: ["src/lib.rs"],
40 test_suites: ["general-tests"],
41 auto_gen_config: true,
Janis Danisevskis7d77a762020-07-20 13:03:31 -070042 rustlibs: [
43 "libandroid_logger",
Janis Danisevskise24f3472020-08-12 17:58:49 -070044 "libandroid_hardware_keymint",
Janis Danisevskis1b3a6e22020-08-07 12:39:56 -070045 "libandroid_security_keystore2",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070046 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070047 "libbinder_rs",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070048 "libkeystore_aidl_generated",
Janis Danisevskisce995432020-07-21 12:22:34 -070049 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000050 "liblazy_static",
Joel Galenson0891bc12020-07-20 10:37:03 -070051 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070052 "liblog_rust",
Joel Galenson26f4d012020-07-17 14:57:21 -070053 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070054 "libthiserror",
55 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000056}
Janis Danisevskis652f3812020-08-04 00:01:12 +000057
58// This is a placeholder for the libraries that will be generated from the AIDL specs
59// eventually.
60rust_library {
61 name: "libkeystore_aidl_generated",
62 crate_name: "keystore_aidl_generated",
63
64 srcs: ["src/aidl_generated.rs"],
65}
Janis Danisevskis1fe11322020-08-07 08:44:08 -070066
67// This is a placeholder for the libraries that will be generated from the AIDL specs
68// eventually.
69rust_library {
70 name: "libandroid_hardware_keymint",
71 crate_name: "android_hardware_keymint",
72
73 srcs: ["src/android_hardware_keymint.rs"],
74
75 rustlibs: [
76 "libbinder_rs",
77 "liblazy_static",
78 ],
79}
80
81// This is a placeholder for the libraries that will be generated from the AIDL specs
82// eventually.
83rust_library {
84 name: "libandroid_security_keystore2",
85 crate_name: "android_security_keystore2",
86
87 srcs: ["src/android_security_keystore2.rs"],
88
89 rustlibs: [
90 "libandroid_hardware_keymint",
91 "libbinder_rs",
92 "liblazy_static",
93 ],
94}