diff options
author | Joel Galenson <jgalenson@google.com> | 2021-05-27 09:38:57 -0700 |
---|---|---|
committer | Joel Galenson <jgalenson@google.com> | 2021-05-27 09:40:19 -0700 |
commit | b3fa6077a0d4a66f1dd728ce23ea48a454c11bb8 (patch) | |
tree | bec0501e1094cccd9e6fbeded10ef744d623fd62 | |
parent | 4ce34f22a26324c1f70b1d9e38619ce08ce11e80 (diff) | |
download | rand_xorshift-b3fa6077a0d4a66f1dd728ce23ea48a454c11bb8.tar.gz |
Use new c2a functionality instead of a patch.
Also migrate to a config file while I'm at it.
Test: Build
Change-Id: I99347eb01ef71787e692b7847252b4ce52ca8def
-rw-r--r-- | Android.bp | 20 | ||||
-rw-r--r-- | cargo2android.json | 9 | ||||
-rw-r--r-- | patches/Android.bp.patch | 24 |
3 files changed, 20 insertions, 33 deletions
@@ -1,4 +1,5 @@ -// This file is generated by cargo2android.py --run --device --tests --dependencies --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_rand_xorshift_license"], @@ -56,8 +57,6 @@ rust_defaults { auto_gen_config: true, edition: "2018", rustlibs: [ - // ANDROID: not really used - //"libbincode", "librand_core", ], } @@ -65,6 +64,9 @@ rust_defaults { rust_test_host { name: "rand_xorshift_host_test_src_lib", defaults: ["rand_xorshift_defaults"], + test_options: { + unit_test: true, + }, } rust_test { @@ -80,8 +82,6 @@ rust_defaults { auto_gen_config: true, edition: "2018", rustlibs: [ - // ANDROID: not really used - //"libbincode", "librand_core", "librand_xorshift", ], @@ -90,6 +90,9 @@ rust_defaults { rust_test_host { name: "rand_xorshift_host_test_tests_mod", defaults: ["rand_xorshift_defaults_mod"], + test_options: { + unit_test: true, + }, } rust_test { @@ -98,7 +101,6 @@ rust_test { } // dependent_library ["feature_list"] -// bincode-1.3.1 -// byteorder-1.3.4 "default,std" -// rand_core-0.6.0 -// serde-1.0.118 "default,std" +// bincode-1.3.3 +// rand_core-0.6.2 +// serde-1.0.126 "default,std" diff --git a/cargo2android.json b/cargo2android.json new file mode 100644 index 0000000..7f3828f --- /dev/null +++ b/cargo2android.json @@ -0,0 +1,9 @@ +{ + "dependencies": true, + "dependency-blocklist": [ + "bincode" + ], + "device": true, + "run": true, + "tests": true +} diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch deleted file mode 100644 index 13b71ce..0000000 --- a/patches/Android.bp.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/Android.bp b/Android.bp -index 704654e..0e6db92 100644 ---- a/Android.bp -+++ b/Android.bp -@@ -19,7 +19,8 @@ rust_defaults { - auto_gen_config: true, - edition: "2018", - rustlibs: [ -- "libbincode", -+ // ANDROID: not really used -+ //"libbincode", - "librand_core", - ], - } -@@ -42,7 +43,8 @@ rust_defaults { - auto_gen_config: true, - edition: "2018", - rustlibs: [ -- "libbincode", -+ // ANDROID: not really used -+ //"libbincode", - "librand_core", - "librand_xorshift", - ], |