Clone this repo:
  1. cd20301 Fix typo by Googler · 4 days ago upstream/master
  2. 500d0a7 Add `java_path`, `java_root`, and `full_classname` to `java_helper` by Googler · 6 days ago
  3. fe16ea8 Internal change by Googler · 7 days ago
  4. 67eac3e Simplify `android_support.bzl` by Googler · 8 days ago
  5. ceb99dc Handle `third_party/java/` nested source roots in `_java_segments` by Googler · 8 days ago

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