Igor Zaslavsky | 455b104 | 2023-08-29 00:42:54 +0000 | [diff] [blame^] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
| 5 | rust_defaults { |
| 6 | name: "libremoteauth_jni_rust_defaults", |
| 7 | crate_name: "remoteauth_jni_rust", |
| 8 | lints: "android", |
| 9 | clippy_lints: "android", |
| 10 | min_sdk_version: "35", |
| 11 | srcs: ["src/lib.rs"], |
| 12 | rustlibs: [ |
| 13 | "libbinder_rs", |
| 14 | "libjni", |
| 15 | "liblazy_static", |
| 16 | "liblog_rust", |
| 17 | "liblogger", |
| 18 | "libnum_traits", |
| 19 | "libthiserror", |
| 20 | "libtokio", |
| 21 | "libanyhow", |
| 22 | ], |
| 23 | proc_macros: [ |
| 24 | "libasync_trait", |
| 25 | ], |
| 26 | prefer_rlib: true, |
| 27 | apex_available: [ |
| 28 | "com.android.remoteauth", |
| 29 | ], |
| 30 | host_supported: true, |
| 31 | } |
| 32 | |
| 33 | rust_test { |
| 34 | name: "libremoteauth_jni_rust_tests", |
| 35 | defaults: ["libremoteauth_jni_rust_defaults"], |
| 36 | rustlibs: [ |
| 37 | ], |
| 38 | target: { |
| 39 | android: { |
| 40 | test_suites: [ |
| 41 | "general-tests", |
| 42 | ], |
| 43 | test_config_template: "remoteauth_rust_test_config_template.xml", |
| 44 | }, |
| 45 | host: { |
| 46 | test_suites: [ |
| 47 | "general-tests", |
| 48 | ], |
| 49 | data_libs: [ |
| 50 | "libandroid_runtime_lazy", |
| 51 | "libbase", |
| 52 | "libbinder", |
| 53 | "libbinder_ndk", |
| 54 | "libcutils", |
| 55 | "liblog", |
| 56 | "libutils", |
| 57 | ], |
| 58 | }, |
| 59 | }, |
| 60 | test_options: { |
| 61 | unit_test: true, |
| 62 | }, |
| 63 | // Support multilib variants (using different suffix per sub-architecture), which is needed on |
| 64 | // build targets with secondary architectures, as the MTS test suite packaging logic flattens |
| 65 | // all test artifacts into a single `testcases` directory. |
| 66 | compile_multilib: "both", |
| 67 | multilib: { |
| 68 | lib32: { |
| 69 | suffix: "32", |
| 70 | }, |
| 71 | lib64: { |
| 72 | suffix: "64", |
| 73 | }, |
| 74 | }, |
| 75 | auto_gen_config: true, |
| 76 | } |