Skip to content

Commit

Permalink
[8.0.0] Update rules_java v8.1.0 (#23920)
Browse files Browse the repository at this point in the history
RELNOTES: Changes the default java language level to 11 (previously 8)
  • Loading branch information
hvadehra authored Oct 9, 2024
1 parent a4d900d commit c481551
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bazel_dep(name = "zstd-jni", version = "1.5.2-3.bcr.1")
bazel_dep(name = "blake3", version = "1.5.1.bcr.1")
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")
bazel_dep(name = "rules_cc", version = "0.0.12")
bazel_dep(name = "rules_java", version = "8.0.1")
bazel_dep(name = "rules_java", version = "8.1.0")
bazel_dep(name = "rules_graalvm", version = "0.11.1")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "rules_jvm_external", version = "6.0")
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions site/en/docs/user-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,14 @@ This option specifies the version of Java sources. For example:
</pre>

compiles and allows only constructs compatible with Java 8 specification.
Default value is 8. -->
Possible values are: 8, 9, 10, 11, 14, 15, and 21 and may be extended by
Default value is 11. -->
Possible values are: 8, 9, 10, 11, 17, and 21 and may be extended by
registering custom Java toolchains using `default_java_toolchain`.

#### `--tool_java_language_version={{ "<var>" }}version{{ "</var>" }}` {:#tool-java-language-version}

The Java language version used to build tools that are executed during a build.
Default value is 8.
Default value is 11.

#### `--java_runtime_version={{ "<var>" }}version{{ "</var>" }}` {:#java-runtime-version}

Expand All @@ -349,7 +349,7 @@ downloads JDK 11 from a remote repository and run the Java application using it.

Default value is `local_jdk`.
Possible values are: `local_jdk`, `local_jdk_{{ "<var>" }}version{{ "</var>" }}`,
`remotejdk_11`, and `remotejdk_17`.
`remotejdk_11`, `remotejdk_17`, and `remotejdk_21`.
You can extend the values by registering custom JVM using either
`local_java_repository` or `remote_java_repository` repository rules.

Expand Down
2 changes: 1 addition & 1 deletion src/MODULE.tools
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use_repo(buildozer_binary, "buildozer_binary")

# Dependencies used to auto-load removed symbols and rules from Bazel (due to Starlarkification)
# See also: --incompatible_autoload_externally, AutoloadSymbols
bazel_dep(name = "rules_java", version = "8.0.1")
bazel_dep(name = "rules_java", version = "8.1.0")
bazel_dep(name = "rules_cc", version = "0.0.12")
bazel_dep(name = "rules_python", version = "0.36.0")
bazel_dep(name = "rules_shell", version = "0.1.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,18 @@ public static void setupWorkspace(MockToolsConfig config) throws IOException {
def proto_library(**kargs):
native.proto_library(**kargs)
""");
config.create(
"protobuf_workspace/bazel/java_proto_library.bzl",
"""
def java_proto_library(**kargs):
native.java_proto_library(**kargs)
""");
config.create(
"protobuf_workspace/bazel/java_lite_proto_library.bzl",
"""
def java_lite_proto_library(**kargs):
native.java_lite_proto_library(**kargs)
""");
config.create(
"protobuf_workspace/bazel/toolchains/proto_toolchain.bzl",
"load(':proto_toolchain_rule.bzl', _proto_toolchain_rule = 'proto_toolchain')",
Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/integration/discard_graph_edges_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function test_packages_cleared() {
[[ "$globs_count" -le 1 ]] \
|| fail "globs count $globs_count too high"
module_count="$(extract_histogram_count "$histo_file" 'eval.Module$')"
[[ "$module_count" -le 265 ]] \
[[ "$module_count" -le 270 ]] \
|| fail "Module count $module_count too high"
ct_count="$(extract_histogram_count "$histo_file" \
'RuleConfiguredTarget$')"
Expand Down
8 changes: 3 additions & 5 deletions src/test/tools/bzlmod/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c481551

Please sign in to comment.