Initial support for header compilation direct deps

This adds a new output to header compilation actions which is used as the classpath for downstream header compilations, instead of using the same output for downstream header and regular compilations. Using a separate output allows trimming information that isn't needed by header compilation, but is required for regular compilation, including methods. This results in a smaller cache key for header compilation actions.

PiperOrigin-RevId: 764512852
Change-Id: I4895e47f3418e9cbf602edd11fde38de5f3e32ca
2 files changed
tree: d5b62321f67c23d8da360c53dae00efbb4f2a2ca
  1. .bazel_checkout/
  2. .bazelci/
  3. .bcr/
  4. .github/
  5. distro/
  6. examples/
  7. java/
  8. test/
  9. toolchains/
  10. .bazelignore
  11. .bazelrc
  12. .gitignore
  13. AUTHORS
  14. BUILD
  15. CODEOWNERS
  16. CONTRIBUTING.md
  17. LICENSE
  18. MODULE.bazel
  19. README.md
  20. renovate.json
  21. WORKSPACE
  22. WORKSPACE.bzlmod
README.md

rules_java

  • Postsubmit Build status
  • Postsubmit + Current Bazel Incompatible Flags Build status

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

Documentation

For a quickstart tutorial, see https://bazel.build/start/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