Separate java_tools into platform independent and prebuilt part. java_tools is repository package containing tools needed during Java compilation: JavaBuilder, patches for Java compiler, ijar, singlejar, ... Most of the files are jars with Java classes. java_tools are released for three platforms: linux, windows and darwin, however the only difference is in two binaries: ijar and singlejar. This is part one of splitting java_tools and releasing split version (following PR makes use of released split version in Bazel) Java_tools used to be released for multiple Java versions, but all the releases were the same except a some string substitutions in BUILD file. I changed to build only a single version, since it already supports Java from 8 to 14. Changes: - BUILD.java_tools is split into BUILD.java_tools_prebuilt (where the second contains prebuilt binaries) - toolchain definitions are removed from BUILD.java_tools and will be added to tools/jdk/BUILD in the second part - java_toolchain_default.bzl.java_tools is removed (default_java_toolchain.bzl will be updated with its features in the second part). - src/BUILD: JAVA_VERSION is removed, targets used to build java_tools.zip are duplicated to build java_tools_prebuilt.zip (done some cleanup as well) - upload_all_java_tools.sh and upload_java_tools.sh: used by Build kite, I removed java_version over the release, but kept it over tests (for different JDKs) - create_java_tools_release.sh: used by the user in the release process - added platform independent part - tests are updated to use platform independent and platform files, some tests had to be disabled and will be reenabled after the release Closes #12546. PiperOrigin-RevId: 344319092
diff --git a/tools/jdk/BUILD.java_tools_prebuilt b/tools/jdk/BUILD.java_tools_prebuilt new file mode 100644 index 0000000..e293c72 --- /dev/null +++ b/tools/jdk/BUILD.java_tools_prebuilt
@@ -0,0 +1,24 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) # Apache 2.0 + +config_setting( + name = "windows", + constraint_values = ["@platforms//os:windows"], +) + +filegroup( + name = "prebuilt_singlejar", + srcs = select({ + ":windows": ["java_tools/src/tools/singlejar/singlejar_local.exe"], + "//conditions:default": ["java_tools/src/tools/singlejar/singlejar_local"], + }), +) + +filegroup( + name = "ijar_prebuilt_binary", + srcs = select({ + ":windows": ["java_tools/ijar/ijar.exe"], + "//conditions:default": ["java_tools/ijar/ijar"], + }), +) \ No newline at end of file