blob: 57e3ec9e9925023aca08e4fa5e16be4a1980bb78 [file] [log] [blame]
Igor Zaslavsky455b1042023-08-29 00:42:54 +00001package {
Aditya Choudhary01b5ede2024-01-31 11:08:57 +00002 default_team: "trendy_team_fwk_core_networking",
Igor Zaslavsky455b1042023-08-29 00:42:54 +00003 default_applicable_licenses: ["Android-Apache-2.0"],
4}
5
6rust_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 Maurer16e96272024-05-14 21:17:35 +000015 "libjni_legacy",
Igor Zaslavsky455b1042023-08-29 00:42:54 +000016 "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 Zaslavsky3521a5e2023-09-01 21:00:43 +000033rust_ffi_shared {
34 name: "libremoteauth_jni_rust",
35 defaults: ["libremoteauth_jni_rust_defaults"],
36 rustlibs: [],
37}
38
Igor Zaslavsky455b1042023-08-29 00:42:54 +000039rust_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}