Generate apex_available from c2a instead of a patch am: df5e894296 am: 8c1a78df60 am: 043907a4a5
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/percent-encoding/+/1689910
Change-Id: I8ca0ccf19c471a6b5aeef3e50b6292dd4b5f02b5
diff --git a/Android.bp b/Android.bp
index 57c9e89..1d2ef2f 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: [
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 57a0a05..0000000
--- a/patches/Android.bp.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/Android.bp b/Android.bp
-index 69f4d37..8421e0b 100644
---- a/Android.bp
-+++ b/Android.bp
-@@ -6,4 +6,9 @@ rust_library {
- crate_name: "percent_encoding",
- srcs: ["lib.rs"],
- edition: "2015",
-+ apex_available: [
-+ "//apex_available:platform",
-+ "com.android.resolv",
-+ ],
-+ min_sdk_version: "29",
- }