From 798c708a188f06be4e6da316127102d7c990e9e7 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Tue, 27 Apr 2021 11:09:40 -0700 Subject: Generate apex_available from c2a instead of a patch Test: Run c2a Test: Build Change-Id: If98f6e18b411a5f9731225ab755be0ee41b0b3d0 --- Android.bp | 6 +++--- cargo2android.json | 10 ++++++++++ patches/Android.bp.patch | 16 ---------------- 3 files changed, 13 insertions(+), 19 deletions(-) create mode 100644 cargo2android.json delete mode 100644 patches/Android.bp.patch diff --git a/Android.bp b/Android.bp index cf14bf9..8661d79 100644 --- a/Android.bp +++ b/Android.bp @@ -1,4 +1,4 @@ -// This file is generated by cargo2android.py --run --device --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 { @@ -57,7 +57,7 @@ rust_library { // dependent_library ["feature_list"] // matches-0.1.8 -// tinyvec-1.1.1 "alloc,default,tinyvec_macros" +// tinyvec-1.2.0 "alloc,default,tinyvec_macros" // tinyvec_macros-0.1.0 -// unicode-bidi-0.3.4 "default" +// unicode-bidi-0.3.5 "default" // unicode-normalization-0.1.17 "default,std" diff --git a/cargo2android.json b/cargo2android.json new file mode 100644 index 0000000..f9f13d4 --- /dev/null +++ b/cargo2android.json @@ -0,0 +1,10 @@ +{ + "apex-available": [ + "//apex_available:platform", + "com.android.resolv" + ], + "dependencies": true, + "device": true, + "min-sdk-version": "29", + "run": true +} \ No newline at end of file diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch deleted file mode 100644 index 64073b3..0000000 --- a/patches/Android.bp.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/Android.bp b/Android.bp -index 45d877a..5de8f15 100644 ---- a/Android.bp -+++ b/Android.bp -@@ -11,6 +11,11 @@ rust_library { - "libunicode_bidi", - "libunicode_normalization", - ], -+ apex_available: [ -+ "//apex_available:platform", -+ "com.android.resolv", -+ ], -+ min_sdk_version: "29", - } - - // dependent_library ["feature_list"] -- cgit v1.2.3