aboutsummaryrefslogtreecommitdiff
path: root/java_grpc_library.bzl
diff options
context:
space:
mode:
authorEric Anderson <ejona@google.com>2018-04-03 15:22:55 -0700
committerGitHub <noreply@github.com>2018-04-03 15:22:55 -0700
commitbace06fe9f027d67bc00a4a621346929a3267a51 (patch)
tree4f55c77659880896632375badb6f970b157699f7 /java_grpc_library.bzl
parentb1d91b9f60c33019ffe36073b4b2a4dbbe95ec67 (diff)
downloadgrpc-grpc-java-bace06fe9f027d67bc00a4a621346929a3267a51.tar.gz
java_grpc_library: Add support for protobuf lite
gRPC's protobuf-lite auto-selects between full and lite protobuf based on the value of crosstool_top. If the user is specifying their own --android_crosstool_top, then it will not auto-detect correctly. One day, platforms will fix problems like this, but for the moment it seems we get to live with it.
Diffstat (limited to 'java_grpc_library.bzl')
-rw-r--r--java_grpc_library.bzl9
1 files changed, 5 insertions, 4 deletions
diff --git a/java_grpc_library.bzl b/java_grpc_library.bzl
index 2a8abb12d..bd3f9b769 100644
--- a/java_grpc_library.bzl
+++ b/java_grpc_library.bzl
@@ -109,14 +109,15 @@ def java_grpc_library(name, srcs, deps, flavor=None,
added_deps = [
"@io_grpc_grpc_java//core",
"@io_grpc_grpc_java//stub",
- "@io_grpc_grpc_java//protobuf",
"@com_google_guava_guava//jar",
]
if flavor == "normal":
- added_deps += ["@com_google_protobuf//:protobuf_java"]
+ added_deps += [
+ "@com_google_protobuf//:protobuf_java",
+ "@io_grpc_grpc_java//protobuf",
+ ]
elif flavor == "lite":
- # TODO: This is currently blocked on https://github.com/google/protobuf/issues/2762
- added_deps += ["@com_google_protobuf_java_lite//:protobuf_java_lite"]
+ added_deps += ["@io_grpc_grpc_java//protobuf-lite"]
else:
fail("Unknown flavor type", "flavor")