Add a dependency on javax-annotations to java_grpc_library
to work around grpc/grpc-java#3633.
Closes
You need to load the rules in your BUILD file for use, like:
load("//third_party/grpc:build_defs.bzl", "java_grpc_library")
"""
+
def _path_ignoring_repository(f):
if (len(f.owner.workspace_root) == 0):
return f.short_path
@@ -96,6 +97,7 @@ def java_grpc_library(name, srcs, deps, enable_deprecated=None, visibility=None,
srcs = [gensource_name],
visibility = visibility,
deps = [
+ "@io_bazel//third_party:javax_annotations",
"@io_bazel//third_party:jsr305",
"@io_bazel//third_party/grpc:grpc-jar",
"@io_bazel//third_party:guava",
