Commit 9cafa201 authored by Jisi Liu's avatar Jisi Liu

Merge pull request #837 from mzhaom/bazel-java

Add "java_proto" target in bazel BUILD file to provide Java runtime library.
parents cccf6fed 60880a7e
......@@ -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