From 69c166aea2541b6fdf8e185eff3dc78e0be6e0ce Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Tue, 23 Apr 2024 16:21:42 +0200 Subject: Generate Android.bp for uniffi_core Bug: 330712502 Test: atest --host Change-Id: I0219616dca70d54de1bf28d0405d70c43d03ba77 --- Android.bp | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ cargo_embargo.json | 3 ++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 Android.bp diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..c21fac2 --- /dev/null +++ b/Android.bp @@ -0,0 +1,71 @@ +// This file is generated by cargo_embargo. +// Do not modify this file after the first "rust_*" or "genrule" module +// because the changes will be overridden on upgrade. +// Content before the first "rust_*" or "genrule" module is preserved. + +package { + default_applicable_licenses: ["external_rust_crates_uniffi_core_license"], +} + +// See: http://go/android-license-faq +license { + name: "external_rust_crates_uniffi_core_license", + visibility: [":__subpackages__"], + license_kinds: ["SPDX-license-identifier-MPL-2.0"], + license_text: ["LICENSE"], +} + +rust_library { + name: "libuniffi_core", + host_supported: true, + crate_name: "uniffi_core", + cargo_env_compat: true, + cargo_pkg_version: "0.26.1", + srcs: ["src/lib.rs"], + edition: "2021", + features: ["default"], + rustlibs: [ + "libanyhow", + "libbytes", + "libcamino", + "liblog_rust", + "libonce_cell", + "liboneshot_uniffi", + "libstatic_assertions", + ], + proc_macros: ["libpaste"], + aliases: ["oneshot_uniffi:oneshot"], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], + product_available: true, + vendor_available: true, +} + +rust_test { + name: "uniffi_core_test_src_lib", + host_supported: true, + crate_name: "uniffi_core", + cargo_env_compat: true, + cargo_pkg_version: "0.26.1", + srcs: ["src/lib.rs"], + test_suites: ["general-tests"], + auto_gen_config: true, + test_options: { + unit_test: true, + }, + edition: "2021", + features: ["default"], + rustlibs: [ + "libanyhow", + "libbytes", + "libcamino", + "liblog_rust", + "libonce_cell", + "liboneshot_uniffi", + "libstatic_assertions", + ], + proc_macros: ["libpaste"], + aliases: ["oneshot_uniffi:oneshot"], +} diff --git a/cargo_embargo.json b/cargo_embargo.json index 9a0a579..d40889a 100644 --- a/cargo_embargo.json +++ b/cargo_embargo.json @@ -1,3 +1,4 @@ { - "tests": true + "run_cargo": false, + "tests": true } -- cgit v1.2.3