Add "java_proto" target in bazel BUILD file to provide Java runtime
library.
This commit is contained in:
parent
0e5686a707
commit
60880a7e46
23
BUILD
23
BUILD
@ -252,6 +252,28 @@ cc_binary(
|
||||
deps = [":protoc_lib"],
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Java support
|
||||
################################################################################
|
||||
genrule(
|
||||
name = "generate_java_descriptor_proto",
|
||||
tools = [":protoc"],
|
||||
srcs = [ "src/google/protobuf/descriptor.proto", ],
|
||||
outs = [ "com/google/protobuf/DescriptorProtos.java" ],
|
||||
cmd = "$(location :protoc) --java_out=$(@D)/../../.. $<",
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "java_proto",
|
||||
visibility = ["//visibility:public"],
|
||||
srcs = glob([
|
||||
"java/src/main/java/com/google/protobuf/*.java"
|
||||
]) + [
|
||||
":generate_java_descriptor_proto",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
################################################################################
|
||||
# Tests
|
||||
################################################################################
|
||||
@ -429,4 +451,3 @@ cc_test(
|
||||
"//external:gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user