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