Skip to content

Remove Java 12 support #11666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 0 additions & 75 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,6 @@ http_archive(
],
)

http_archive(
name = "java_tools_langtools_javac12",
sha256 = "99b107105165a91df82cd7cf82a8efb930d803fb7de1663cf7f780142104cd14",
urls = [
"https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk12.zip",
],
)

# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_remote_tools.WORKSPACE
http_archive(
name = "android_tools_for_testing",
Expand Down Expand Up @@ -856,37 +848,6 @@ http_archive(
],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "remote_java_tools_javac12_test_linux",
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
sha256 = "3997ee9a57b095748f1c0d084839fab2fbc72504aeb7b37b1f71c31738d330e3",
urls = ["https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_linux-v3.0.zip"],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "remote_java_tools_javac12_test_windows",
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
sha256 = "cfad1718dad1fed12816748eed27ab30b9ea1268c8ce9940acf3b5b7d82d483d",
urls = [
"https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_windows-v3.0.zip",
],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "remote_java_tools_javac12_test_darwin",
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
sha256 = "54df966e7583bafe659e39b4103a4ce934201d969de638d071ada07d8e0c1a3a",
urls = [
"https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_darwin-v3.0.zip",
],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "openjdk11_linux_archive",
Expand Down Expand Up @@ -923,42 +884,6 @@ exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "openjdk12_linux_archive",
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
sha256 = "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13",
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-linux_x64",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz"],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "openjdk12_darwin_archive",
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
sha256 = "67ca9d285056132ebb19fa237a14affda52132142e1171fe1c20e18974b3b8a5",
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-macosx_x64",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-macosx_x64.tar.gz"],
)

# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
http_archive(
name = "openjdk12_windows_archive",
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
sha256 = "cf28404c23c3aa1115363ba6e796c30580a768e1d7d6681a7d053e516008e00d",
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-win_x64",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-win_x64.zip"],
)

load("@io_bazel_skydoc//:setup.bzl", "stardoc_repositories")

stardoc_repositories()
Expand Down
8 changes: 1 addition & 7 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ JAVA_TOOLS_DEPLOY_JARS = [
"//conditions:default": [],
})

JAVA_VERSIONS = ("11", "12")
JAVA_VERSIONS = ("11",)

[
genrule(
Expand Down Expand Up @@ -744,9 +744,6 @@ filegroup(
"@openjdk11_darwin_archive//:WORKSPACE",
"@openjdk11_linux_archive//:WORKSPACE",
"@openjdk11_windows_archive//:WORKSPACE",
"@openjdk12_darwin_archive//:WORKSPACE",
"@openjdk12_linux_archive//:WORKSPACE",
"@openjdk12_windows_archive//:WORKSPACE",
"@openjdk_linux_aarch64_minimal//file",
"@openjdk_linux_minimal//file",
"@openjdk_macos_minimal//file",
Expand All @@ -756,9 +753,6 @@ filegroup(
"@remote_java_tools_javac11_test_darwin//:WORKSPACE",
"@remote_java_tools_javac11_test_linux//:WORKSPACE",
"@remote_java_tools_javac11_test_windows//:WORKSPACE",
"@remote_java_tools_javac12_test_darwin//:WORKSPACE",
"@remote_java_tools_javac12_test_linux//:WORKSPACE",
"@remote_java_tools_javac12_test_windows//:WORKSPACE",
"@remote_java_tools_linux_for_testing//:WORKSPACE",
"@remote_java_tools_windows_for_testing//:WORKSPACE",
"@remotejdk11_linux_aarch64_for_testing//:WORKSPACE",
Expand Down
25 changes: 1 addition & 24 deletions src/test/shell/bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,29 +178,6 @@ sh_test(
],
)

sh_test(
name = "bazel_java12_test",
srcs = ["bazel_java12_test.sh"],
args = [
# --java_toolchain and --host_java_toolchain values
"@local_java_tools//:toolchain_jdk_12",
# java_tools zip to test
"src/java_tools_java12.zip",
] + select({
# --javabase and --host_javabase values
"//src/conditions:darwin": ["@openjdk12_darwin_archive//:runtime"],
"//src/conditions:darwin_x86_64": ["@openjdk12_darwin_archive//:runtime"],
"//src/conditions:windows": ["@openjdk12_windows_archive//:runtime"],
"//src/conditions:linux_x86_64": ["@openjdk12_linux_archive//:runtime"],
}),
data = [
":test-deps",
"//src:java_tools_java12_zip",
"//src/test/shell/bazel/testdata:jdk_http_archives_filegroup",
"@bazel_tools//tools/bash/runfiles",
],
)

sh_test(
name = "bazel_java_test",
# TODO(iirina): Investigate if the 'large' and 'eternal' values still apply.
Expand All @@ -219,7 +196,7 @@ sh_test(
exec_compatible_with = ["//:highcpu_machine"],
)

JAVA_VERSIONS = ("11", "12")
JAVA_VERSIONS = ("11",)

[
sh_test(
Expand Down
132 changes: 0 additions & 132 deletions src/test/shell/bazel/bazel_java12_test.sh

This file was deleted.

50 changes: 0 additions & 50 deletions src/test/shell/bazel/testdata/jdk_http_archives
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@ http_archive(
],
)

################### Remote java_tools with embedded javac 12 ###################
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
name = "remote_java_tools_javac12_test_linux",
sha256 = "3997ee9a57b095748f1c0d084839fab2fbc72504aeb7b37b1f71c31738d330e3",
urls = ["https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_linux-v3.0.zip"],
)
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
name = "remote_java_tools_javac12_test_windows",
sha256 = "cfad1718dad1fed12816748eed27ab30b9ea1268c8ce9940acf3b5b7d82d483d",
urls = [
"https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_windows-v3.0.zip",
],
)
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
name = "remote_java_tools_javac12_test_darwin",
sha256 = "54df966e7583bafe659e39b4103a4ce934201d969de638d071ada07d8e0c1a3a",
urls = [
"https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_darwin-v3.0.zip",
],
)

#################################### JDK 11 ####################################
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
Expand All @@ -73,29 +49,3 @@ http_archive(
strip_prefix = "zulu11.37.17-ca-jdk11.0.6-win_x64",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"],
)

#################################### JDK 12 ####################################
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
name = "openjdk12_linux_archive",
build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])",
sha256 = "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13",
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-linux_x64",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz"],
)
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
name = "openjdk12_darwin_archive",
build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])",
sha256 = "67ca9d285056132ebb19fa237a14affda52132142e1171fe1c20e18974b3b8a5",
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-macosx_x64",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-macosx_x64.tar.gz"],
)
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
name = "openjdk12_windows_archive",
build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])",
sha256 = "cf28404c23c3aa1115363ba6e796c30580a768e1d7d6681a7d053e516008e00d",
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-win_x64",
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-win_x64.zip"],
)
6 changes: 0 additions & 6 deletions src/test/shell/testenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,6 @@ EOF
"openjdk11_darwin_archive"
"openjdk11_linux_archive"
"openjdk11_windows_archive"
"openjdk12_darwin_archive"
"openjdk12_linux_archive"
"openjdk12_windows_archive"
"openjdk_linux_aarch64_minimal"
"openjdk_linux_minimal"
"openjdk_macos_minimal"
Expand All @@ -292,9 +289,6 @@ EOF
"remote_java_tools_javac11_test_darwin"
"remote_java_tools_javac11_test_linux"
"remote_java_tools_javac11_test_windows"
"remote_java_tools_javac12_test_darwin"
"remote_java_tools_javac12_test_linux"
"remote_java_tools_javac12_test_windows"
"remote_java_tools_linux_for_testing"
"remote_java_tools_windows_for_testing"
"remotejdk11_linux_for_testing"
Expand Down
2 changes: 1 addition & 1 deletion src/upload_all_java_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bazel_version=$(bazel info release | cut -d' ' -f2)

# Passing the same commit_hash and timestamp to all targets to mark all the artifacts
# uploaded on GCS with the same identifier.
for java_version in 11 12; do
for java_version in 11; do

bazel build //src:java_tools_java${java_version}_zip
zip_path=${PWD}/bazel-bin/src/java_tools_java${java_version}.zip
Expand Down