rules_java
rules_java copied to clipboard
Java rules for Bazel
The PR at https://github.com/bazelbuild/rules_java/pull/135 looks dormant, this makes the change requested at https://github.com/bazelbuild/rules_java/pull/135#issuecomment-1797985514 I don't need the entire change here, having the jmods as a filegroup is sufficient for using...
Problem in version 6.5.0: no such target '@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type'
When upgrading from 6.4.0 to 6.5.0 I noticed this failure: ``` ERROR: /external/remotejdk11_linux_toolchain_config_repo/BUILD.bazel:27:10: no such target '@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type': target 'bootstrap_runtime_toolchain_type' not declared in package 'tools/jdk' defined by /external/bazel_tools/tools/jdk/BUILD (Tip: use `query...
With `--@rules_java//java:incompatible_language_version_bootclasspath`, the bootclasspath used for Java compilation is now determined based on the numeric version specified in `--java_language_version` and the type specified in `--java_runtime_version` rather than just using the...
The jmods is important for anybody attempting to use the `jlink` command with a custom `--add-modules` flag.
Currently, only four platforms have prebuilt java_tools binaries (singlejar, ijar, etc.): linux, windows, darwin_x86_64, darwin_arm64. https://github.com/bazelbuild/rules_java/blob/3c34c81569e72f9984d7bdbcfd93d172ba685e4b/java/repositories.bzl#L27-L51 However, other parts of rules_java supports more platforms, like remotejdk21 which additionally supports Linux...
Title is a bit vague here, apologies for that. Out-of-the-box, it is only possible to provide a single entry point to `java_test`, e.g. ``` java_test( name = "com.example.MyLovelyUnitTest", test_class =...
(It feels awkward to ask this question here, but it is a follow-up of [ this suggestion over at rules_oci ](https://github.com/bazel-contrib/rules_oci/issues/416#issuecomment-1832829593)) As the maintainers have decided that the rules_oci repository...
It seems that `--java_language_version` and related flags are not respected by `rules_java`. **Expected behaviour**: setting the following flags in `.bazelrc` should build using a Java 17 JDK: ``` build --java_language_version=17...
When upgrading to Bazel 7.0.0, which upgraded my version of rules_java to 7.1.0, I have found that when building a test jar it has upgraded to using Java 21 despite...