Cleanup
Migrate to using a config file.
Generate the apex_available as part of the config file and not a patch.
Remove the test timeout, as it was added to the updater in aosp/1556124.
Test: Run c2a/updater.
Change-Id: I78a0e064c22dc606ea38d618122fa74fb02df38f
diff --git a/Android.bp b/Android.bp
index 49e26d2..b0ab1f2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --device --dependencies --features alloc,default,dev_urandom_fallback,once_cell,std --tests --patch=patches/Android.bp.diff.
+// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
package {
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..c9cf3c2
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,13 @@
+{
+ "apex-available": [
+ "//apex_available:platform",
+ "com.android.resolv"
+ ],
+ "dependencies": true,
+ "device": true,
+ "features": "alloc,default,dev_urandom_fallback,once_cell,std",
+ "min-sdk-version": "29",
+ "patch": "patches/Android.bp.diff",
+ "run": true,
+ "tests": true
+}
\ No newline at end of file
diff --git a/patches/Android.bp.diff b/patches/Android.bp.diff
index 184ca81..cce538e 100644
--- a/patches/Android.bp.diff
+++ b/patches/Android.bp.diff
@@ -1,16 +1,11 @@
--- Android.bp.old 2020-12-14 18:12:19.236831007 +0900
+++ Android.bp 2020-12-14 18:12:26.756763208 +0900
-@@ -20,8 +20,12 @@ rust_library {
+@@ -20,8 +20,7 @@ rust_library {
],
static_libs: [
"libring-core",
- "libring-test",
],
-+ apex_available: [
-+ "//apex_available:platform",
-+ "com.android.resolv",
-+ ],
-+ min_sdk_version: "29",
}
rust_defaults {
diff --git a/patches/TEST_MAPPING.diff b/patches/TEST_MAPPING.diff
deleted file mode 100644
index 44f9684..0000000
--- a/patches/TEST_MAPPING.diff
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/TEST_MAPPING b/TEST_MAPPING
-index cf1b50f..a151304 100644
---- a/TEST_MAPPING
-+++ b/TEST_MAPPING
-@@ -34,7 +34,12 @@
- "name": "ring_host_test_tests_digest_tests"
- },
- {
-- "name": "ring_device_test_tests_digest_tests"
-+ "name": "ring_device_test_tests_digest_tests",
-+ "options": [
-+ {
-+ "test-timeout": "600000"
-+ }
-+ ]
- },
- {
- "host": true,