bazel: update to new ProtoInfo provider

This is part of #5383. As Bazel 0.22.0 is the only supported version
now, use this in the Kokoro build.
This commit is contained in:
Rodrigo Queiro 2019-03-01 05:30:48 +01:00 committed by Eric Anderson
parent 054def3c63
commit 0959a846c8
2 changed files with 5 additions and 3 deletions

View File

@ -2,6 +2,8 @@
set -exu -o pipefail
cat /VERSION
use_bazel.sh 0.22.0
bazel version
cd github/grpc-java

View File

@ -14,8 +14,8 @@ def _java_rpc_library_impl(ctx):
print(("in srcs attribute of {0}: Proto source with label {1} should be in " +
"same package as consuming rule").format(ctx.label, ctx.attr.srcs[0].label))
srcs = ctx.attr.srcs[0].proto.direct_sources
includes = ctx.attr.srcs[0].proto.transitive_imports
srcs = ctx.attr.srcs[0][ProtoInfo].direct_sources
includes = ctx.attr.srcs[0][ProtoInfo].transitive_imports
flavor = ctx.attr.flavor
if flavor == "normal":
flavor = ""
@ -54,7 +54,7 @@ _java_rpc_library = rule(
"srcs": attr.label_list(
mandatory = True,
allow_empty = False,
providers = ["proto"],
providers = [ProtoInfo],
),
"deps": attr.label_list(
mandatory = True,