Bazel: Fix running tests with toolchain_vanilla

Javabase option was accidentally omitted, but without that option the
tests are failing with toolchain_vanilla.

Also fix java_next config setting detection. In I721067202de toolchain
vanilla was forked from @bazel_tools//tools/jdk:toolchain_vanilla to
//tools:toolchain_vanilla to fix hard coding of target language level
to Java 8 (byte code major version 52), but the detection of config
setting was missed to be adapted.

Change-Id: I827ce58ae28fc2479dae0654a9b202fa61875087
This commit is contained in:
David Ostrovsky 2019-09-26 17:19:27 +02:00 committed by David Ostrovsky
parent bdea2b3f5a
commit 5f45e82eb6
2 changed files with 2 additions and 1 deletions

2
BUILD
View File

@ -13,7 +13,7 @@ config_setting(
config_setting(
name = "java_next",
values = {
"java_toolchain": "@bazel_tools//tools/jdk:toolchain_vanilla",
"java_toolchain": "//tools:toolchain_vanilla",
},
)

View File

@ -42,6 +42,7 @@ provide the path to JDK home:
```
$ bazel build \
--define=ABSOLUTE_JAVABASE=<path-to-java-12> \
--javabase=@bazel_tools//tools/jdk:absolute_javabase \
--host_javabase=@bazel_tools//tools/jdk:absolute_javabase \
--host_java_toolchain=//tools:toolchain_vanilla \
--java_toolchain=//tools:toolchain_vanilla \