gerrit/proto/BUILD
David Ostrovsky 3ed0112115 Bazel: Fix eclipse classpath generation
Since I819954da56 JUnit test is added that depends on reviewdb_proto,
however, this new dependency wasn't added to Eclipse classpath
generation machinery. Widen the visibility of that library and add
it to the transitive closure of Eclipse classpath generation.

Ad a side effect, we need to conditionally query compilation_info
attribute during classpath generation, because java_proto_library
doesn't expose this attribute.

Bug: Issue 9564
Change-Id: I4ef1be9b1f7db9764f6bc8e5571da6ba6ac211f6
2018-08-14 08:22:40 +02:00

32 lines
684 B
Python

proto_library(
name = "cache_proto",
srcs = ["cache.proto"],
)
java_proto_library(
name = "cache_java_proto",
visibility = ["//visibility:public"],
deps = [":cache_proto"],
)
genrule(
name = "gen_reviewdb_proto",
outs = ["reviewdb.proto"],
cmd = "$(location //java/com/google/gerrit/proto:ProtoGen) -o $@",
tools = ["//java/com/google/gerrit/proto:ProtoGen"],
)
proto_library(
name = "reviewdb_proto",
srcs = [":reviewdb.proto"],
)
java_proto_library(
name = "reviewdb_java_proto",
visibility = [
"//javatests/com/google/gerrit/proto:__pkg__",
"//tools/eclipse:__pkg__",
],
deps = [":reviewdb_proto"],
)