From bc8f324b771d42294720b16803e59ca397737306 Mon Sep 17 00:00:00 2001 From: Brad Corso Date: Sun, 22 Dec 2024 16:42:07 -0800 Subject: [PATCH] Use "-release" instead of "-source -target". RELNOTES=N/A PiperOrigin-RevId: 708892114 --- .bazelrc | 2 +- build_defs.bzl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index e02e83d0858..485f3ce2d05 100644 --- a/.bazelrc +++ b/.bazelrc @@ -24,7 +24,7 @@ build --java_runtime_version=remotejdk_18 build --tool_java_runtime_version=remotejdk_18 # Default source/target versions. -build --javacopt="-source 8 -target 8" +build --javacopt="--release 8" # Workaround for https://openjdk.java.net/jeps/411. # See https://github.com/bazelbuild/bazel/issues/14502#issuecomment-1018366245. diff --git a/build_defs.bzl b/build_defs.bzl index 3dd0647ca89..6f56ff44512 100644 --- a/build_defs.bzl +++ b/build_defs.bzl @@ -18,6 +18,6 @@ DOCLINT_HTML_AND_SYNTAX = ["-Xdoclint:html,syntax"] DOCLINT_REFERENCES = ["-Xdoclint:reference"] -JAVA_RELEASE_MIN = ["-source 8 -target 8"] +JAVA_RELEASE_MIN = ["--release 8"] POM_VERSION = "${project.version}"