Commit 60880a7e authored by Ming Zhao's avatar Ming Zhao

Add "java_proto" target in bazel BUILD file to provide Java runtime

library.
parent 0e5686a7
......@@ -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",
],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment