Clone this repo:

Branches

  1. f81734b Add links to documentation to the rules_java README by Googler · 18 hours ago master
  2. 349608c Release `rules_java` `v8.5.0` by Googler · 22 hours ago
  3. 97a3dfb Remove top-level usage of native `java_common` in java_toolchain.bzl by Googler · 22 hours ago
  4. 8bc4290 Release `rules_java` `v8.5.0-rc2` by Googler · 2 days ago
  5. 7170aea Release `rules_java` `v8.5.0-rc1` by Googler · 2 days ago

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