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", |
Matthew Maurer | 16e9627 | 2024-05-14 21:17:35 +0000 | [diff] [blame] | 15 | "libjni_legacy", |
Igor Zaslavsky | 455b104 | 2023-08-29 00:42:54 +0000 | [diff] [blame] | 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 | |
Igor Zaslavsky | 3521a5e | 2023-09-01 21:00:43 +0000 | [diff] [blame] | 33 | rust_ffi_shared { |
| 34 | name: "libremoteauth_jni_rust", |
| 35 | defaults: ["libremoteauth_jni_rust_defaults"], |
| 36 | rustlibs: [], |
| 37 | } |
| 38 | |
Igor Zaslavsky | 455b104 | 2023-08-29 00:42:54 +0000 | [diff] [blame] | 39 | rust_test { |
| 40 | name: "libremoteauth_jni_rust_tests", |
| 41 | defaults: ["libremoteauth_jni_rust_defaults"], |
| 42 | rustlibs: [ |
| 43 | ], |
| 44 | target: { |
| 45 | android: { |
| 46 | test_suites: [ |
| 47 | "general-tests", |
| 48 | ], |
| 49 | test_config_template: "remoteauth_rust_test_config_template.xml", |
| 50 | }, |
| 51 | host: { |
| 52 | test_suites: [ |
| 53 | "general-tests", |
| 54 | ], |
| 55 | data_libs: [ |
| 56 | "libandroid_runtime_lazy", |
| 57 | "libbase", |
| 58 | "libbinder", |
| 59 | "libbinder_ndk", |
| 60 | "libcutils", |
| 61 | "liblog", |
| 62 | "libutils", |
| 63 | ], |
| 64 | }, |
| 65 | }, |
| 66 | test_options: { |
| 67 | unit_test: true, |
| 68 | }, |
| 69 | // Support multilib variants (using different suffix per sub-architecture), which is needed on |
| 70 | // build targets with secondary architectures, as the MTS test suite packaging logic flattens |
| 71 | // all test artifacts into a single `testcases` directory. |
| 72 | compile_multilib: "both", |
| 73 | multilib: { |
| 74 | lib32: { |
| 75 | suffix: "32", |
| 76 | }, |
| 77 | lib64: { |
| 78 | suffix: "64", |
| 79 | }, |
| 80 | }, |
| 81 | auto_gen_config: true, |
| 82 | } |