Unverified Commit 5dad7cce authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #4257 from davido/support_java9

Bazel: Support building with Java 9
parents 9717d6fa 85b488f7
...@@ -4,6 +4,17 @@ licenses(["notice"]) ...@@ -4,6 +4,17 @@ licenses(["notice"])
exports_files(["LICENSE"]) exports_files(["LICENSE"])
################################################################################
# Java 9 configuration
################################################################################
config_setting(
name = "jdk9",
values = {
"java_toolchain": "@bazel_tools//tools/jdk:toolchain_jdk9",
},
)
################################################################################ ################################################################################
# Protobuf Runtime Library # Protobuf Runtime Library
################################################################################ ################################################################################
...@@ -608,7 +619,10 @@ java_library( ...@@ -608,7 +619,10 @@ java_library(
]) + [ ]) + [
":gen_well_known_protos_java", ":gen_well_known_protos_java",
], ],
javacopts = ["-source 7", "-target 7"], javacopts = select({
"//:jdk9": ["--add-modules=jdk.unsupported"],
"//conditions:default": ["-source 7", "-target 7"],
}),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
......
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