Migrate to cargo_embargo. am: deac707af7

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/clap/+/2859887

Change-Id: I9cea06d04b73a9e3df121befc2130ad78520c366
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/3.2.23/Android.bp b/3.2.23/Android.bp
index d2a25ae..3acde9b 100644
--- a/3.2.23/Android.bp
+++ b/3.2.23/Android.bp
@@ -1,8 +1,6 @@
-// This file is generated by cargo2android.py --config cargo2android.json.
+// This file is generated by cargo_embargo.
 // Do not modify this file as changes will be overridden on upgrade.
 
-
-
 package {
     default_applicable_licenses: ["external_rust_crates_clap_3.2.23_license"],
 }
diff --git a/3.2.23/cargo2android.json b/3.2.23/cargo2android.json
deleted file mode 100644
index 71f70c0..0000000
--- a/3.2.23/cargo2android.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  "patch": "patches/Android.bp.diff",
-  "device": true,
-  "features": "std",
-  "run": true,
-  "tests": true,
-  "name-suffix": "_3.2.23",
-  "dep-suffixes": {
-    "bitflags": "-1.3.2"
-  }
-}
diff --git a/3.2.23/cargo_embargo.json b/3.2.23/cargo_embargo.json
new file mode 100644
index 0000000..d067cdc
--- /dev/null
+++ b/3.2.23/cargo_embargo.json
@@ -0,0 +1,13 @@
+{
+  "features": [
+    "std"
+  ],
+  "module_blocklist": [
+    "stdio_fixture"
+  ],
+  "module_name_overrides": {
+    "libbitflags": "libbitflags-1.3.2",
+    "libclap": "libclap_3.2.23"
+  },
+  "run_cargo": false
+}
diff --git a/3.2.23/patches/Android.bp.diff b/3.2.23/patches/Android.bp.diff
deleted file mode 100644
index c67c004..0000000
--- a/3.2.23/patches/Android.bp.diff
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/3.2.23/Android.bp b/3.2.23/Android.bp
-index 0593d09..0e1e5ea 100644
---- a/3.2.23/Android.bp
-+++ b/3.2.23/Android.bp
-@@ -23,24 +23,3 @@ rust_library {
-         "//apex_available:anyapex",
-     ],
- }
--
--rust_binary {
--    name: "stdio_fixture_3.2.23",
--    // has rustc warnings
--    host_supported: true,
--    crate_name: "stdio_fixture",
--    cargo_env_compat: true,
--    cargo_pkg_version: "3.2.23",
--    srcs: ["src/bin/stdio-fixture.rs"],
--    edition: "2021",
--    features: ["std"],
--    rustlibs: [
--        "libbitflags-1.3.2",
--        "libclap",
--        "libclap_lex",
--        "libindexmap",
--        "libtextwrap",
--    ],
--    product_available: true,
--    vendor_available: true,
--}