diff options
author | Victor Hsieh <victorhsieh@google.com> | 2021-03-15 16:47:28 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-03-15 16:47:28 +0000 |
commit | 6c43afa75c12482c7b35ce5333bb1150dc182b81 (patch) | |
tree | b80ba6ef708bb85f1c4764f4cda4822b09dd6fcf | |
parent | 811b6f65b59167a572d928bbe32870d62271bf1c (diff) | |
parent | 450c65d8ba506d12bd5c6a752334c86ab101b03b (diff) | |
download | structopt-6c43afa75c12482c7b35ce5333bb1150dc182b81.tar.gz |
Allow structopt crate in com.android.virt apex am: 450c65d8ba
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/structopt/+/1633999
Change-Id: I860b166c7aaedf79d06f75dae844eb2d9dd6406c
-rw-r--r-- | Android.bp | 51 | ||||
-rw-r--r-- | TEST_MAPPING | 8 | ||||
-rw-r--r-- | patches/Android.bp.patch | 15 |
3 files changed, 33 insertions, 41 deletions
@@ -1,40 +1,5 @@ -// This file is generated by cargo2android.py --run --device --dependencies. - -package { - default_applicable_licenses: ["external_rust_crates_structopt_license"], -} - -// Added automatically by a large-scale-change that took the approach of -// 'apply every license found to every target'. While this makes sure we respect -// every license restriction, it may not be entirely correct. -// -// e.g. GPL in an MIT project might only apply to the contrib/ directory. -// -// Please consider splitting the single license below into multiple licenses, -// taking care not to lose any license_kind information, and overriding the -// default license using the 'licenses: [...]' property on targets as needed. -// -// For unused files, consider creating a 'fileGroup' with "//visibility:private" -// to attach the license to, and including a comment whether the files may be -// used in the current project. -// -// large-scale-change included anything that looked like it might be a license -// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. -// -// Please consider removing redundant or irrelevant files from 'license_text:'. -// See: http://go/android-license-faq -license { - name: "external_rust_crates_structopt_license", - visibility: [":__subpackages__"], - license_kinds: [ - "SPDX-license-identifier-Apache-2.0", - "SPDX-license-identifier-MIT", - ], - license_text: [ - "LICENSE-APACHE", - "LICENSE-MIT", - ], -} +// This file is generated by cargo2android.py --run --device --dependencies --patch=patches/Android.bp.patch. +// Do not modify this file as changes will be overridden on upgrade. rust_library { name: "libstructopt", @@ -48,6 +13,10 @@ rust_library { "liblazy_static", ], proc_macros: ["libstructopt_derive"], + apex_available: [ + "//apex_available:platform", + "com.android.virt", + ], } // dependent_library ["feature_list"] @@ -55,16 +24,16 @@ rust_library { // atty-0.2.14 // bitflags-1.2.1 "default" // clap-2.33.3 "ansi_term,atty,color,default,strsim,suggestions,vec_map" -// heck-0.3.1 +// heck-0.3.2 // lazy_static-1.4.0 -// libc-0.2.80 +// libc-0.2.88 // proc-macro-error-1.0.4 "default,syn,syn-error" // proc-macro-error-attr-1.0.4 // proc-macro2-1.0.24 "default,proc-macro" -// quote-1.0.7 "default,proc-macro" +// quote-1.0.9 "default,proc-macro" // strsim-0.8.0 // structopt-derive-0.4.14 -// syn-1.0.53 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit" +// syn-1.0.63 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote" // textwrap-0.11.0 // unicode-segmentation-1.7.1 // unicode-width-0.1.8 "default" diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..0f4f93c --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,8 @@ +// Generated by update_crate_tests.py for tests that depend on this crate. +{ + "presubmit": [ + { + "name": "authfs_device_test_src_lib" + } + ] +} diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch new file mode 100644 index 0000000..979197c --- /dev/null +++ b/patches/Android.bp.patch @@ -0,0 +1,15 @@ +diff --git a/Android.bp b/Android.bp +index 2695275..01ae097 100644 +--- a/Android.bp ++++ b/Android.bp +@@ -13,6 +13,10 @@ rust_library { + "liblazy_static", + ], + proc_macros: ["libstructopt_derive"], ++ apex_available: [ ++ "//apex_available:platform", ++ "com.android.virt", ++ ], + } + + // dependent_library ["feature_list"] |