Use @com_google_protobuf instead of @protobuf in rules_java

This is to support WORKSPACE mode. Bazel <=7 requires the repository to be called @com_google_protobuf because of the default value of --protocol_compiler flag. To make the migration smooth we need to have the same requirement in Bazel 8.

Upgrade rules_cc to 0.0.15 because of the same thing.
Patch BUILD.java_tools from Bazel with @com_google_protobuf.
Reorder WORKSPACE, so that the correct version of Protobuf is picked up.

PiperOrigin-RevId: 694411552
Change-Id: I1d5d30bc28becc8fe8575846c54bd5ef2d431aa8
8 files changed
tree: 771f8827014a341b1eec55febcc06f09f8ea9a94
  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.