blob: ef3220bf31ee22b26a144092a26c5e529b3832cb [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 Danisevskis71dc30d2020-09-11 14:30:34 -070021 "android.system.keystore2-rust",
Shawn Willden708744a2020-12-11 13:05:27 +000022 "android.hardware.security.keymint-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070023 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070024 "libbinder_rs",
Janis Danisevskisce995432020-07-21 12:22:34 -070025 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000026 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000027 "liblibc",
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"],
Joel Galenson82a4ecf2020-11-20 14:19:40 -080040 test_suites: ["device-tests"],
41 auto_gen_config: false,
42 test_config: "AndroidTest.xml",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070043 rustlibs: [
Janis Danisevskis71dc30d2020-09-11 14:30:34 -070044 "android.system.keystore2-rust",
Shawn Willden708744a2020-12-11 13:05:27 +000045 "android.hardware.security.keymint-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070046 "libandroid_logger",
47 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070048 "libbinder_rs",
Janis Danisevskisce995432020-07-21 12:22:34 -070049 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000050 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000051 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070052 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070053 "liblog_rust",
Janis Danisevskisbf15d732020-12-08 10:35:26 -080054 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070055 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070056 "libthiserror",
57 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000058}
Janis Danisevskis652f3812020-08-04 00:01:12 +000059
Janis Danisevskis1af91262020-08-10 14:58:08 -070060rust_binary {
61 name: "keystore2",
62 srcs: ["src/keystore2_main.rs"],
63 rustlibs: [
64 "libandroid_logger",
65 "libbinder_rs",
66 "libkeystore2",
67 "liblog_rust",
68 ],
69 init_rc: ["keystore2.rc"],
70}