Janis Danisevskis | 43c8971 | 2020-08-03 23:42:42 +0000 | [diff] [blame] | 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 | |
| 15 | rust_library { |
| 16 | name: "libkeystore2", |
| 17 | crate_name: "keystore2", |
| 18 | srcs: ["src/lib.rs"], |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 19 | |
| 20 | rustlibs: [ |
Shawn Willden | 708744a | 2020-12-11 13:05:27 +0000 | [diff] [blame] | 21 | "android.hardware.security.keymint-rust", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame^] | 22 | "android.security.apc-rust", |
| 23 | "android.system.keystore2-rust", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 24 | "libanyhow", |
Janis Danisevskis | e24f347 | 2020-08-12 17:58:49 -0700 | [diff] [blame] | 25 | "libbinder_rs", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame^] | 26 | "libkeystore2_apc_compat-rust", |
Janis Danisevskis | b42fc18 | 2020-12-15 08:41:27 -0800 | [diff] [blame] | 27 | "libkeystore2_crypto_rust", |
Janis Danisevskis | ce99543 | 2020-07-21 12:22:34 -0700 | [diff] [blame] | 28 | "libkeystore2_selinux", |
Janis Danisevskis | 4ad056f | 2020-08-05 19:46:46 +0000 | [diff] [blame] | 29 | "liblazy_static", |
Hasini Gunasinghe | 557b103 | 2020-11-10 01:35:30 +0000 | [diff] [blame] | 30 | "liblibc", |
Joel Galenson | 0891bc1 | 2020-07-20 10:37:03 -0700 | [diff] [blame] | 31 | "liblibsqlite3_sys", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 32 | "liblog_rust", |
Joel Galenson | 0891bc1 | 2020-07-20 10:37:03 -0700 | [diff] [blame] | 33 | "librand", |
Joel Galenson | 26f4d01 | 2020-07-17 14:57:21 -0700 | [diff] [blame] | 34 | "librusqlite", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 35 | "libthiserror", |
| 36 | ], |
Janis Danisevskis | 43c8971 | 2020-08-03 23:42:42 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | rust_test { |
| 40 | name: "keystore2_test", |
Joel Galenson | 26f4d01 | 2020-07-17 14:57:21 -0700 | [diff] [blame] | 41 | crate_name: "keystore2", |
Janis Danisevskis | 43c8971 | 2020-08-03 23:42:42 +0000 | [diff] [blame] | 42 | srcs: ["src/lib.rs"], |
Joel Galenson | 82a4ecf | 2020-11-20 14:19:40 -0800 | [diff] [blame] | 43 | test_suites: ["device-tests"], |
| 44 | auto_gen_config: false, |
| 45 | test_config: "AndroidTest.xml", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 46 | rustlibs: [ |
Shawn Willden | 708744a | 2020-12-11 13:05:27 +0000 | [diff] [blame] | 47 | "android.hardware.security.keymint-rust", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame^] | 48 | "android.security.apc-rust", |
| 49 | "android.system.keystore2-rust", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 50 | "libandroid_logger", |
| 51 | "libanyhow", |
Janis Danisevskis | e24f347 | 2020-08-12 17:58:49 -0700 | [diff] [blame] | 52 | "libbinder_rs", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame^] | 53 | "libkeystore2_apc_compat-rust", |
Janis Danisevskis | b42fc18 | 2020-12-15 08:41:27 -0800 | [diff] [blame] | 54 | "libkeystore2_crypto_rust", |
Janis Danisevskis | ce99543 | 2020-07-21 12:22:34 -0700 | [diff] [blame] | 55 | "libkeystore2_selinux", |
Janis Danisevskis | 4ad056f | 2020-08-05 19:46:46 +0000 | [diff] [blame] | 56 | "liblazy_static", |
Hasini Gunasinghe | 557b103 | 2020-11-10 01:35:30 +0000 | [diff] [blame] | 57 | "liblibc", |
Joel Galenson | 0891bc1 | 2020-07-20 10:37:03 -0700 | [diff] [blame] | 58 | "liblibsqlite3_sys", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 59 | "liblog_rust", |
Janis Danisevskis | bf15d73 | 2020-12-08 10:35:26 -0800 | [diff] [blame] | 60 | "librand", |
Joel Galenson | 26f4d01 | 2020-07-17 14:57:21 -0700 | [diff] [blame] | 61 | "librusqlite", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 62 | "libthiserror", |
| 63 | ], |
Janis Danisevskis | 43c8971 | 2020-08-03 23:42:42 +0000 | [diff] [blame] | 64 | } |
Janis Danisevskis | 652f381 | 2020-08-04 00:01:12 +0000 | [diff] [blame] | 65 | |
Janis Danisevskis | 1af9126 | 2020-08-10 14:58:08 -0700 | [diff] [blame] | 66 | rust_binary { |
| 67 | name: "keystore2", |
| 68 | srcs: ["src/keystore2_main.rs"], |
| 69 | rustlibs: [ |
| 70 | "libandroid_logger", |
| 71 | "libbinder_rs", |
| 72 | "libkeystore2", |
| 73 | "liblog_rust", |
| 74 | ], |
| 75 | init_rc: ["keystore2.rc"], |
| 76 | } |