aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp3
-rw-r--r--cargo2android.json12
-rw-r--r--patches/Android.bp.patch13
3 files changed, 17 insertions, 11 deletions
diff --git a/Android.bp b/Android.bp
index 79d2971..5d95d6d 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_spin_license"],
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..5441827
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,12 @@
+{
+ "apex-available": [
+ "//apex_available:platform",
+ "com.android.resolv"
+ ],
+ "dependencies": true,
+ "device": true,
+ "min-sdk-version": "29",
+ "patch": "patches/Android.bp.patch",
+ "run": true,
+ "tests": true
+} \ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index e8aa924..f606cb9 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -2,22 +2,15 @@ diff --git a/Android.bp b/Android.bp
index 96531ab..43db8ef 100644
--- a/Android.bp
+++ b/Android.bp
-@@ -8,8 +8,14 @@ rust_library {
+@@ -39,6 +39,7 @@ rust_library {
edition: "2015",
features: [
"default",
+ "std",
"ticket_mutex",
],
-+ apex_available: [
-+ "//apex_available:platform",
-+ "com.android.resolv",
-+ ],
-+ min_sdk_version: "29",
- }
-
- rust_defaults {
-@@ -21,6 +27,7 @@ rust_defaults {
+ apex_available: [
+@@ -56,6 +62,7 @@ rust_defaults {
edition: "2015",
features: [
"default",