aboutsummaryrefslogtreecommitdiff
path: root/repositories.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 /repositories.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 'repositories.bzl')
-rw-r--r--repositories.bzl12
1 files changed, 12 insertions, 0 deletions
diff --git a/repositories.bzl b/repositories.bzl
index 857063b6e..3329d09c6 100644
--- a/repositories.bzl
+++ b/repositories.bzl
@@ -9,6 +9,7 @@ def grpc_java_repositories(
omit_com_google_guava=False,
omit_com_google_protobuf=False,
omit_com_google_protobuf_java=False,
+ omit_com_google_protobuf_javalite=False,
omit_com_google_protobuf_nano_protobuf_javanano=False,
omit_com_google_truth_truth=False,
omit_com_squareup_okhttp=False,
@@ -45,6 +46,8 @@ def grpc_java_repositories(
com_google_protobuf()
if omit_com_google_protobuf_java:
fail("omit_com_google_protobuf_java is no longer supported and must be not be passed to grpc_java_repositories()")
+ if not omit_com_google_protobuf_javalite:
+ com_google_protobuf_javalite()
if not omit_com_google_protobuf_nano_protobuf_javanano:
com_google_protobuf_nano_protobuf_javanano()
if not omit_com_google_truth_truth:
@@ -146,6 +149,15 @@ def com_google_protobuf():
urls = ["https://github.com/google/protobuf/archive/v3.5.1.zip"],
)
+def com_google_protobuf_javalite():
+ # java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite
+ native.http_archive(
+ name = "com_google_protobuf_javalite",
+ sha256 = "d8a2fed3708781196f92e1e7e7e713cf66804bd2944894401057214aff4f468e",
+ strip_prefix = "protobuf-5e8916e881c573c5d83980197a6f783c132d4276",
+ urls = ["https://github.com/google/protobuf/archive/5e8916e881c573c5d83980197a6f783c132d4276.zip"],
+ )
+
def com_google_protobuf_nano_protobuf_javanano():
native.maven_jar(
name = "com_google_protobuf_nano_protobuf_javanano",