aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-30 21:48:29 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-30 21:48:29 +0000
commit32bce41150313719d353a0232cb1ced7e43a4e56 (patch)
tree07e417965430c949b82f3fdbfc899805953b77c1
parent200a6f24a6798738235a1f165dbfbad427ff78b4 (diff)
parent58d5197ca7782da91daae36d6c2c943405c58288 (diff)
downloadgrpcio-build-tools-release.tar.gz
Snap for 11784721 from 58d5197ca7782da91daae36d6c2c943405c58288 to build-tools-releasebuild-tools-release
Change-Id: Ie5168989aa6b484eb3e0d1a3a4aab36d543acbba
-rw-r--r--Android.bp10
-rw-r--r--cargo2android_cfgs.bp5
-rw-r--r--cargo_embargo.json5
-rw-r--r--patches/lib.rs17
-rw-r--r--src/lib.rs6
5 files changed, 3 insertions, 40 deletions
diff --git a/Android.bp b/Android.bp
index 0a99629..e054608 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,6 @@
// This file is generated by cargo_embargo.
-// Do not modify this file as changes will be overridden on upgrade.
+// Do not modify this file as most changes will be overridden on upgrade.
+// Content before the first "rust_*" or "genrule" module is preserved.
package {
default_applicable_licenses: ["external_rust_crates_grpcio_license"],
@@ -41,13 +42,8 @@ rust_library {
"libparking_lot",
"libprotobuf",
],
+ aliases: ["protobuf:protobufv3"],
apex_available: ["//apex_available:platform"],
vendor_available: true,
min_sdk_version: "29",
- cfgs: [
- // cfg(soong) is used to distinguish code that only builds on Android, so
- // that (most of) the same code can be built under both Soong and cargo.
- "soong",
- ],
-
}
diff --git a/cargo2android_cfgs.bp b/cargo2android_cfgs.bp
deleted file mode 100644
index 328d17d..0000000
--- a/cargo2android_cfgs.bp
+++ /dev/null
@@ -1,5 +0,0 @@
-cfgs: [
- // cfg(soong) is used to distinguish code that only builds on Android, so
- // that (most of) the same code can be built under both Soong and cargo.
- "soong",
-]
diff --git a/cargo_embargo.json b/cargo_embargo.json
index 5d8821e..dfb3166 100644
--- a/cargo_embargo.json
+++ b/cargo_embargo.json
@@ -8,10 +8,5 @@
"protobufv3-codec"
],
"min_sdk_version": "29",
- "package": {
- "grpcio": {
- "add_module_block": "cargo2android_cfgs.bp"
- }
- },
"product_available": false
}
diff --git a/patches/lib.rs b/patches/lib.rs
deleted file mode 100644
index 0a1d2e9..0000000
--- a/patches/lib.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/src/lib.rs b/src/lib.rs
-index c8cebca..ba47f95 100644
---- a/src/lib.rs
-+++ b/src/lib.rs
-@@ -29,6 +29,12 @@ use grpcio_sys as grpc_sys;
- #[macro_use]
- extern crate log;
-
-+// grpcio with feature protobufv3-codec expects a "protobufv3" dependency,
-+// but Android.bp is not able to rename dependencies yet. See b/308790322.
-+// It is enabled unconditionally since protobufv3-codec also is.
-+#[cfg(soong)]
-+extern crate protobuf as protobufv3;
-+
- mod buf;
- mod call;
- mod channel;
diff --git a/src/lib.rs b/src/lib.rs
index ba47f95..c8cebca 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -29,12 +29,6 @@ use grpcio_sys as grpc_sys;
#[macro_use]
extern crate log;
-// grpcio with feature protobufv3-codec expects a "protobufv3" dependency,
-// but Android.bp is not able to rename dependencies yet. See b/308790322.
-// It is enabled unconditionally since protobufv3-codec also is.
-#[cfg(soong)]
-extern crate protobuf as protobufv3;
-
mod buf;
mod call;
mod channel;