Merge branch 'stable-2.15'
* stable-2.15:
ElasticContainer: Use Elasticsearch 6.4.1 for V6_4 tests
AbstractDaemonTest: Don't delete common server path too early
Fix toolchain definitions for bazel 0.17.1
Bazel: Bump baseline to 0.17.1
Change-Id: Ic1217b4ed7495eb325cb73cfb453775e61a1181b
diff --git a/WORKSPACE b/WORKSPACE
index dca68d3..f910ca6 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -30,7 +30,7 @@
load("@bazel_skylib//:lib.bzl", "versions")
-versions.check(minimum_bazel_version = "0.14.0")
+versions.check(minimum_bazel_version = "0.17.1")
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")
diff --git a/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java b/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java
index 8b3c08f..b95a910 100644
--- a/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java
+++ b/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java
@@ -51,7 +51,7 @@
case V6_3:
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.2";
case V6_4:
- return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.0";
+ return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.1";
}
throw new IllegalStateException("No tests for version: " + version.name());
}
diff --git a/tools/BUILD b/tools/BUILD
index 73ecfb9..c368eed 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -1,4 +1,8 @@
-load("@bazel_tools//tools/jdk:default_java_toolchain.bzl", "default_java_toolchain")
+load(
+ "@bazel_tools//tools/jdk:default_java_toolchain.bzl",
+ "JDK9_JVM_OPTS",
+ "default_java_toolchain",
+)
py_binary(
name = "merge_jars",
@@ -7,44 +11,10 @@
visibility = ["//visibility:public"],
)
-# TODO(davido): remove this when minimum suported Bazel version >= 0.17
-# Copied from tools/jdk/default_java_toolchain.bzl to make Bazel 0.16
-# and later Bazel released to work as expected. See this issue for context:
-# https://github.com/bazelbuild/bazel/issues/6009
-JDK9_JVM_OPTS = [
- # Allow JavaBuilder to access internal javac APIs.
- "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
- "--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
- "--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
- "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
- "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
- "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
- "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
- "--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
-
- # override the javac in the JDK.
- "--patch-module=java.compiler=$(location @bazel_tools//third_party/java/jdk/langtools:java_compiler_jar)",
- "--patch-module=jdk.compiler=$(location @bazel_tools//third_party/java/jdk/langtools:jdk_compiler_jar)",
-
- # quiet warnings from com.google.protobuf.UnsafeUtil,
- # see: https://github.com/google/protobuf/issues/3781
- "--add-opens=java.base/java.nio=ALL-UNNAMED",
-]
-
-# See https://github.com/bazelbuild/bazel/issues/3427 for more context
-default_java_toolchain(
- name = "error_prone_warnings_toolchain_bazel_0.16",
- bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath.jar"],
- jvm_opts = JDK9_JVM_OPTS,
- package_configuration = [
- ":error_prone",
- ],
- visibility = ["//visibility:public"],
-)
-
default_java_toolchain(
name = "error_prone_warnings_toolchain",
- bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath.jar"],
+ bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath9.jar"],
+ jvm_opts = JDK9_JVM_OPTS,
package_configuration = [
":error_prone",
],