8.13.0
Changes since 8.12.0
d1e335a Release rules_java v8.13.0
c289c72 Update java_tools v15.0
d927aa0 Fix Runfiles docs after #301 (#302)
1a2c184 use DefaultInfo in rules_java (#303)
1947744 Add support for --incompatible_compact_repo_mapping_manifest (#301)
fecb9fb Remove a reference to incompatible_disallow_java_import_empty_jars after unknown commit
a75e722 In make_non_strict, header_compilation_direct_deps should be the same as compile_jars, not full_compile_jars
ae8a5b2 Initial support for header compilation direct deps
899c2b7 Improve the error message for no matching bootclasspath (#296)
0af04ab Replace asserts on library_identifier with static_library
MODULE.bazel setup
bazel_dep(name = "rules_java", version = "8.13.0")
WORKSPACE setup
With Bazel 8.0.0 and before 8.3.0, add the following to your file:
# https://github.com/bazelbuild/bazel/pull/26119
common --repositories_without_autoloads=bazel_features_version,bazel_features_globals
In all cases, add the following to your file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_java",
urls = [
"https://github.com/bazelbuild/rules_java/releases/download/8.13.0/rules_java-8.13.0.tar.gz",
],
sha256 = "b6c6d92ca9dbb77de31fb6c6a794d20427072663ce41c2b047902ffcc123e3ef",
)
load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")
rules_java_dependencies()
load("@bazel_features//:deps.bzl", "bazel_features_deps")
bazel_features_deps()
# note that the following line is what is minimally required from protobuf for the java rules
# consider using the protobuf_deps() public API from @com_google_protobuf//:protobuf_deps.bzl
load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility
proto_bazel_features(name = "proto_bazel_features")
# register toolchains
load("@rules_java//java:repositories.bzl", "rules_java_toolchains")
rules_java_toolchains()
Using the rules
See the source.