summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam Miller-Cushon <cushon@google.com>2018-06-23 08:30:54 +0200
committerDavid Pursehouse <dpursehouse@collab.net>2019-03-01 09:04:34 +0900
commitce50bea69a111d30e8071b89ac4bdb41abe07f7d (patch)
tree2c84eaf0c6c6cfad8698e74c93c41390361665d5
parentb780f23fdcf1cebb7e2f424ba39c1680013e1c9a (diff)
Bazel: Use target JDK for GWT compilation
This distinction is important as preparation for supporting Java 9, and to be able to build Gerrit with Bazel 0.23. Bug: Issue 10536 Change-Id: Ifee4ced92cc046aec65d39afa87437d895e0a8c7
-rw-r--r--tools/bzl/gwt.bzl6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/bzl/gwt.bzl b/tools/bzl/gwt.bzl
index b94ea51a75..4f54d73e0d 100644
--- a/tools/bzl/gwt.bzl
+++ b/tools/bzl/gwt.bzl
@@ -166,7 +166,8 @@ def _gwt_binary_impl(ctx):
gwt_user_agent_modules.append(ua.zip)
module = ua.module
- cmd = "external/local_jdk/bin/java %s -Dgwt.normalizeTimestamps=true -cp %s %s -war %s -deploy %s " % (
+ cmd = "%s %s -Dgwt.normalizeTimestamps=true -cp %s %s -war %s -deploy %s " % (
+ ctx.attr._jdk[java_common.JavaRuntimeInfo].java_executable_exec_path,
" ".join(ctx.attr.jvm_args),
":".join(paths),
GWT_COMPILER,
@@ -222,7 +223,8 @@ gwt_binary = rule(
"user_agent": attr.string(),
"deps": attr.label_list(allow_files = jar_filetype),
"_jdk": attr.label(
- default = Label("//tools/defaults:jdk"),
+ default = Label("@bazel_tools//tools/jdk:current_java_runtime"),
+ cfg = "host",
),
"_zip": attr.label(
default = Label("@bazel_tools//tools/zip:zipper"),