mirror of https://github.com/grpc/grpc-java.git
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:
parent
054def3c63
commit
0959a846c8
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
set -exu -o pipefail
|
set -exu -o pipefail
|
||||||
cat /VERSION
|
cat /VERSION
|
||||||
|
|
||||||
|
use_bazel.sh 0.22.0
|
||||||
bazel version
|
bazel version
|
||||||
|
|
||||||
cd github/grpc-java
|
cd github/grpc-java
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ def _java_rpc_library_impl(ctx):
|
||||||
print(("in srcs attribute of {0}: Proto source with label {1} should be in " +
|
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))
|
"same package as consuming rule").format(ctx.label, ctx.attr.srcs[0].label))
|
||||||
|
|
||||||
srcs = ctx.attr.srcs[0].proto.direct_sources
|
srcs = ctx.attr.srcs[0][ProtoInfo].direct_sources
|
||||||
includes = ctx.attr.srcs[0].proto.transitive_imports
|
includes = ctx.attr.srcs[0][ProtoInfo].transitive_imports
|
||||||
flavor = ctx.attr.flavor
|
flavor = ctx.attr.flavor
|
||||||
if flavor == "normal":
|
if flavor == "normal":
|
||||||
flavor = ""
|
flavor = ""
|
||||||
|
|
@ -54,7 +54,7 @@ _java_rpc_library = rule(
|
||||||
"srcs": attr.label_list(
|
"srcs": attr.label_list(
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
allow_empty = False,
|
allow_empty = False,
|
||||||
providers = ["proto"],
|
providers = [ProtoInfo],
|
||||||
),
|
),
|
||||||
"deps": attr.label_list(
|
"deps": attr.label_list(
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue