Files
gerrit/lib/greenmail/BUILD
David Ostrovsky cf4f70bc2a Bazel: Add support for toolchain_java11
This change also removes the support for building with Java 9
and 10.

Test Plan:

* Run the tests with Java 8 toolchain (the same as before this change):

  $ bazel test //...

* Run the tests with remote Java 11 toolchain (new feature added here):

  $ bazel test --host_javabase=@bazel_tools//tools/jdk:remote_jdk11 \
    --javabase=@bazel_tools//tools/jdk:remote_jdk11 \
    --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_java11 \
    --java_toolchain=@bazel_tools//tools/jdk:toolchain_java11 \
    //...

Change-Id: Ib67dcc50a43f998bc8f5a363a8f681e3693d1f26
2019-09-19 10:20:32 +02:00

25 lines
591 B
Python

load("@rules_java//java:defs.bzl", "java_library")
package(default_visibility = ["//visibility:public"])
POST_JDK8_DEPS = [":javax-activation"]
java_library(
name = "javax-activation",
testonly = True,
data = ["//lib:LICENSE-DO_NOT_DISTRIBUTE"],
exports = ["@javax-activation//jar"],
)
java_library(
name = "greenmail",
testonly = True,
data = ["//lib:LICENSE-Apache2.0"],
exports = ["@greenmail//jar"],
runtime_deps = select({
"//:java11": POST_JDK8_DEPS,
"//:java_next": POST_JDK8_DEPS,
"//conditions:default": [],
}),
)