blob: a95a8fb90d059fadea119fa5b4ef931d2bdfb455 [file] [log] [blame]
Igor Zaslavsky455b1042023-08-29 00:42:54 +00001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_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
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}