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: [ |
Jeongik Cha | 9f632c6 | 2021-01-23 09:33:35 +0900 | [diff] [blame] | 21 | "android.hardware.security.keymint-V1-rust", |
| 22 | "android.hardware.security.secureclock-V1-rust", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 23 | "android.security.apc-rust", |
Janis Danisevskis | 9f10a6a | 2021-01-18 16:45:21 +0000 | [diff] [blame] | 24 | "android.security.authorization-rust", |
Joel Galenson | de386b4 | 2020-09-30 10:53:05 -0700 | [diff] [blame] | 25 | "android.security.compat-rust", |
Max Bires | 148c08e | 2020-10-13 13:41:41 -0700 | [diff] [blame] | 26 | "android.security.remoteprovisioning-rust", |
Hasini Gunasinghe | da89555 | 2021-01-27 19:34:37 +0000 | [diff] [blame^] | 27 | "android.security.usermanager-rust", |
Jeongik Cha | 9f632c6 | 2021-01-23 09:33:35 +0900 | [diff] [blame] | 28 | "android.system.keystore2-V1-rust", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 29 | "libanyhow", |
Janis Danisevskis | e24f347 | 2020-08-12 17:58:49 -0700 | [diff] [blame] | 30 | "libbinder_rs", |
Janis Danisevskis | 212c68b | 2021-01-14 22:29:28 -0800 | [diff] [blame] | 31 | "libkeystore2_aaid-rust", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 32 | "libkeystore2_apc_compat-rust", |
Janis Danisevskis | b42fc18 | 2020-12-15 08:41:27 -0800 | [diff] [blame] | 33 | "libkeystore2_crypto_rust", |
Joel Galenson | de386b4 | 2020-09-30 10:53:05 -0700 | [diff] [blame] | 34 | "libkeystore2_km_compat", |
Janis Danisevskis | ce99543 | 2020-07-21 12:22:34 -0700 | [diff] [blame] | 35 | "libkeystore2_selinux", |
Janis Danisevskis | 4ad056f | 2020-08-05 19:46:46 +0000 | [diff] [blame] | 36 | "liblazy_static", |
Hasini Gunasinghe | 557b103 | 2020-11-10 01:35:30 +0000 | [diff] [blame] | 37 | "liblibc", |
Joel Galenson | 0891bc1 | 2020-07-20 10:37:03 -0700 | [diff] [blame] | 38 | "liblibsqlite3_sys", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 39 | "liblog_rust", |
Joel Galenson | 0891bc1 | 2020-07-20 10:37:03 -0700 | [diff] [blame] | 40 | "librand", |
Joel Galenson | 26f4d01 | 2020-07-17 14:57:21 -0700 | [diff] [blame] | 41 | "librusqlite", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 42 | "libthiserror", |
| 43 | ], |
Janis Danisevskis | 43c8971 | 2020-08-03 23:42:42 +0000 | [diff] [blame] | 44 | } |
| 45 | |
Janis Danisevskis | 2a8330a | 2021-01-20 15:34:26 -0800 | [diff] [blame] | 46 | rust_library { |
| 47 | name: "libkeystore2_test_utils", |
| 48 | crate_name: "keystore2_test_utils", |
| 49 | srcs: ["test_utils/lib.rs"], |
| 50 | rustlibs: [ |
| 51 | "liblog_rust", |
| 52 | "librand", |
| 53 | ] |
| 54 | } |
| 55 | |
Janis Danisevskis | 43c8971 | 2020-08-03 23:42:42 +0000 | [diff] [blame] | 56 | rust_test { |
| 57 | name: "keystore2_test", |
Joel Galenson | 26f4d01 | 2020-07-17 14:57:21 -0700 | [diff] [blame] | 58 | crate_name: "keystore2", |
Janis Danisevskis | 43c8971 | 2020-08-03 23:42:42 +0000 | [diff] [blame] | 59 | srcs: ["src/lib.rs"], |
Joel Galenson | 3f78dd8 | 2021-01-20 16:21:30 -0800 | [diff] [blame] | 60 | test_suites: ["general-tests"], |
| 61 | auto_gen_config: true, |
Janis Danisevskis | 66784c4 | 2021-01-27 08:40:25 -0800 | [diff] [blame] | 62 | compile_multilib: "first", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 63 | rustlibs: [ |
Jeongik Cha | 9f632c6 | 2021-01-23 09:33:35 +0900 | [diff] [blame] | 64 | "android.hardware.security.keymint-V1-rust", |
| 65 | "android.hardware.security.secureclock-V1-rust", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 66 | "android.security.apc-rust", |
Janis Danisevskis | 9f10a6a | 2021-01-18 16:45:21 +0000 | [diff] [blame] | 67 | "android.security.authorization-rust", |
Joel Galenson | de386b4 | 2020-09-30 10:53:05 -0700 | [diff] [blame] | 68 | "android.security.compat-rust", |
Max Bires | 148c08e | 2020-10-13 13:41:41 -0700 | [diff] [blame] | 69 | "android.security.remoteprovisioning-rust", |
Hasini Gunasinghe | da89555 | 2021-01-27 19:34:37 +0000 | [diff] [blame^] | 70 | "android.security.usermanager-rust", |
Jeongik Cha | 9f632c6 | 2021-01-23 09:33:35 +0900 | [diff] [blame] | 71 | "android.system.keystore2-V1-rust", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 72 | "libandroid_logger", |
| 73 | "libanyhow", |
Janis Danisevskis | e24f347 | 2020-08-12 17:58:49 -0700 | [diff] [blame] | 74 | "libbinder_rs", |
Janis Danisevskis | 212c68b | 2021-01-14 22:29:28 -0800 | [diff] [blame] | 75 | "libkeystore2_aaid-rust", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 76 | "libkeystore2_apc_compat-rust", |
Janis Danisevskis | b42fc18 | 2020-12-15 08:41:27 -0800 | [diff] [blame] | 77 | "libkeystore2_crypto_rust", |
Joel Galenson | de386b4 | 2020-09-30 10:53:05 -0700 | [diff] [blame] | 78 | "libkeystore2_km_compat", |
Janis Danisevskis | ce99543 | 2020-07-21 12:22:34 -0700 | [diff] [blame] | 79 | "libkeystore2_selinux", |
Janis Danisevskis | 2a8330a | 2021-01-20 15:34:26 -0800 | [diff] [blame] | 80 | "libkeystore2_test_utils", |
Janis Danisevskis | 4ad056f | 2020-08-05 19:46:46 +0000 | [diff] [blame] | 81 | "liblazy_static", |
Hasini Gunasinghe | 557b103 | 2020-11-10 01:35:30 +0000 | [diff] [blame] | 82 | "liblibc", |
Joel Galenson | 0891bc1 | 2020-07-20 10:37:03 -0700 | [diff] [blame] | 83 | "liblibsqlite3_sys", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 84 | "liblog_rust", |
Janis Danisevskis | bf15d73 | 2020-12-08 10:35:26 -0800 | [diff] [blame] | 85 | "librand", |
Joel Galenson | 26f4d01 | 2020-07-17 14:57:21 -0700 | [diff] [blame] | 86 | "librusqlite", |
Janis Danisevskis | 7d77a76 | 2020-07-20 13:03:31 -0700 | [diff] [blame] | 87 | "libthiserror", |
| 88 | ], |
Janis Danisevskis | 43c8971 | 2020-08-03 23:42:42 +0000 | [diff] [blame] | 89 | } |
Janis Danisevskis | 652f381 | 2020-08-04 00:01:12 +0000 | [diff] [blame] | 90 | |
Janis Danisevskis | 1af9126 | 2020-08-10 14:58:08 -0700 | [diff] [blame] | 91 | rust_binary { |
| 92 | name: "keystore2", |
| 93 | srcs: ["src/keystore2_main.rs"], |
| 94 | rustlibs: [ |
| 95 | "libandroid_logger", |
| 96 | "libbinder_rs", |
| 97 | "libkeystore2", |
| 98 | "liblog_rust", |
| 99 | ], |
| 100 | init_rc: ["keystore2.rc"], |
| 101 | } |