Define the Java toolchain types in rules_java (#392) Defines `//toolchains:toolchain_type`, `:runtime_toolchain_type` and `:bootstrap_runtime_toolchain_type` as the actual toolchain types rather than aliases into `@bazel_tools`, conditional on a `bazel_features` feature that is always `False` for now. https://github.com/bazelbuild/bazel/pull/32196 will allow them to be flipped over. Until then and on all older versions they are aliases of the types in `@bazel_tools`, so both labels always refer to the same type. Work towards bazelbuild/bazel#32428 Closes #392 COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_java/pull/392 from fmeum:java-toolchain-types 41f05fc81aba83ee0b317c07ccc87b60d8295690 PiperOrigin-RevId: 1022628752 Change-Id: I8a330969a62951cec2db1484cee3a6a658b2e119
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