aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-04-30 01:06:22 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-04-30 01:06:22 +0000
commit87e63640b28d9ba78c9e2831ec0d10efda1f2618 (patch)
tree9a0d8f711d29ef10cada1eca97bdda6252989cd9
parent569ba94be1c679aaae0954a6eeb5ca91c40b2739 (diff)
parent79401926776fe75253e92c83c8ebc92a99e248d9 (diff)
downloaduntrusted-android12-d1-s5-release.tar.gz
Change-Id: Iae4c4315c5299e567c49056a4b6ea16f89c51204
-rw-r--r--Android.bp12
-rw-r--r--cargo2android.json11
-rw-r--r--patches/Android.bp.patch16
3 files changed, 22 insertions, 17 deletions
diff --git a/Android.bp b/Android.bp
index 539722d..cab84c6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
-// This file is generated by cargo2android.py --run --device --dependencies --tests --patch=patches/Android.bp.patch.
+// This file is generated by cargo2android.py --config cargo2android.json.
+// Do not modify this file as changes will be overridden on upgrade.
package {
default_applicable_licenses: ["external_rust_crates_untrusted_license"],
@@ -19,6 +20,7 @@ license {
rust_library {
name: "libuntrusted",
+ // has rustc warnings
host_supported: true,
crate_name: "untrusted",
srcs: ["src/untrusted.rs"],
@@ -33,6 +35,7 @@ rust_library {
rust_defaults {
name: "untrusted_defaults",
crate_name: "untrusted",
+ // has rustc warnings
srcs: ["src/untrusted.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
@@ -42,6 +45,9 @@ rust_defaults {
rust_test_host {
name: "untrusted_host_test_src_untrusted",
defaults: ["untrusted_defaults"],
+ test_options: {
+ unit_test: true,
+ },
}
rust_test {
@@ -52,6 +58,7 @@ rust_test {
rust_defaults {
name: "untrusted_defaults_tests",
crate_name: "tests",
+ // has rustc warnings
srcs: ["tests/tests.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
@@ -64,6 +71,9 @@ rust_defaults {
rust_test_host {
name: "untrusted_host_test_tests_tests",
defaults: ["untrusted_defaults_tests"],
+ test_options: {
+ unit_test: true,
+ },
}
rust_test {
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..911c36f
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,11 @@
+{
+ "apex-available": [
+ "//apex_available:platform",
+ "com.android.resolv"
+ ],
+ "dependencies": true,
+ "device": true,
+ "min-sdk-version": "29",
+ "run": true,
+ "tests": true
+} \ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
deleted file mode 100644
index 90cc841..0000000
--- a/patches/Android.bp.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/Android.bp b/Android.bp
-index 52ab13d..eaf9020 100644
---- a/Android.bp
-+++ b/Android.bp
-@@ -6,6 +6,11 @@ rust_library {
- crate_name: "untrusted",
- srcs: ["src/untrusted.rs"],
- edition: "2018",
-+ apex_available: [
-+ "//apex_available:platform",
-+ "com.android.resolv",
-+ ],
-+ min_sdk_version: "29",
- }
-
- rust_defaults {