Delete downloaded archive after hashing in dump_remote_jdk_configs (#372)

The dump_remote_jdk_configs genrule downloads each remote JDK archive to a per-iteration mktemp file to compute its sha256, but never removes it. A full run fetches every configured JDK (all versions and platforms, ~200 MB each), so it leaves roughly 7 GB of archives behind in /tmp.

Remove the temp file at the end of each loop iteration, keeping peak /tmp usage to a single archive instead of the whole set.

Closes #372

COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_java/pull/372 from davido:cleanup-dump-jdk-configs-tmpfiles 2925ac55a7c03a087cec045688f01ab9c0493934
PiperOrigin-RevId: 960780649
Change-Id: I595703b694a6c131c2fbcf7c193acc36a6bb8ebd
1 file changed
tree: 30ee9f35d55810bc69b62c67ccc0561dee114cfe
  1. .bazel_checkout/
  2. .bazelci/
  3. .bcr/
  4. .github/
  5. distro/
  6. examples/
  7. java/
  8. test/
  9. third_party/
  10. toolchains/
  11. .bazelignore
  12. .bazelrc
  13. .gitignore
  14. AUTHORS
  15. BUILD
  16. CODEOWNERS
  17. CONTRIBUTING.md
  18. LICENSE
  19. MODULE.bazel
  20. README.md
  21. renovate.json
  22. WORKSPACE
  23. WORKSPACE.bzlmod
README.md

rules_java

Build status

Java Rules for Bazel https://bazel.build.

Documentation

For a quickstart tutorial, see https://bazel.build/start/java

The fastest way to try this in an empty project is to click the green “Use this template” button on https://github.com/bazel-starters/java.

For slightly more advanced usage, like setting up toolchains or writing your own java-like rules, see https://bazel.build/docs/bazel-and-java

Core Java rules

Add a load like:

load("@rules_java//java:java_library.bzl", "java_library")

to your BUILD / BUILD.bazel / *.bzl files

For detailed docs on the core rules, see https://bazel.build/reference/be/java