Add support for configuring `--system` using `java_package_configuration`

Also use `cfg = "target"` for `java_toolchain.package_configuration` to ensure `java_package_configuration.system` is built in the target config, and do the exec transition later for `java_package_configuration.data` (which we do want in the exec config). The system needs to match the target Java language configuration, the data is an exec dependency used at built-time.

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

rules_java

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

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