Skip to content

Commit

Permalink
Wire up oneversion tool in java_tools
Browse files Browse the repository at this point in the history
* Adds a prebuilt `one_version` tool as well as sources to `java_tools`.
* Avoids passing `--whitelist` to `one_version` if no allowlist is configured in the toolchain, which isn't supported by the Bazel version of `oneversion` yet.
* Documents the `one_version` flags.
* Clean up tests not updated after recent rules_java releases.
  • Loading branch information
fmeum committed May 6, 2024
1 parent 3c5b1ca commit 1e8ff63
Show file tree
Hide file tree
Showing 15 changed files with 447 additions and 64 deletions.
7 changes: 7 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ tasks:
- "//src/main/starlark/tests/builtins_bzl/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/one_version/..."
- "//src/tools/singlejar/..."
- "//src/tools/workspacelog/..."
- "//third_party/ijar/..."
Expand Down Expand Up @@ -90,6 +91,7 @@ tasks:
- "//src/main/starlark/tests/builtins_bzl/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/one_version/..."
- "//src/tools/singlejar/..."
- "//src/tools/workspacelog/..."
- "//third_party/ijar/..."
Expand Down Expand Up @@ -149,6 +151,7 @@ tasks:
- "//src/main/starlark/tests/builtins_bzl/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/one_version/..."
- "//src/tools/singlejar/..."
- "//src/tools/workspacelog/..."
- "//third_party/ijar/..."
Expand Down Expand Up @@ -184,6 +187,7 @@ tasks:
- "//src/main/starlark/tests/builtins_bzl/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/one_version/..."
- "//src/tools/singlejar/..."
- "//src/tools/workspacelog/..."
- "//third_party/ijar/..."
Expand Down Expand Up @@ -285,6 +289,7 @@ tasks:
- "//src/main/starlark/tests/builtins_bzl/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/one_version/..."
- "//src/tools/singlejar/..."
- "//src/tools/workspacelog/..."
- "//third_party/ijar/..."
Expand Down Expand Up @@ -332,6 +337,7 @@ tasks:
- "//src/test/res/..."
- "//src/test/shell/..."
- "//src/tools/launcher/..."
- "//src/tools/one_version/..."
- "//src/tools/singlejar/..."
- "//third_party/def_parser/..."
- "//tools/android/..."
Expand Down Expand Up @@ -408,6 +414,7 @@ tasks:
- "//src/main/starlark/tests/builtins_bzl/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/one_version/..."
- "//src/tools/singlejar/..."
- "//src/tools/workspacelog/..."
- "//third_party/ijar/..."
Expand Down
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ build:ubuntu2004 --config=remote_shared
# Alias
build:remote --config=ubuntu2004

build:macos --macos_minimum_os=10.11
build:macos --macos_minimum_os=10.13

# On Windows, we need pywin32 pip package, which doesn't work with the Python hermetic toolchain.
# See https://github.com/bazelbuild/rules_python/issues/1356
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_jvm_external", version = "6.0")
bazel_dep(name = "rules_python", version = "0.28.0")
bazel_dep(name = "rules_testing", version = "0.6.0")
bazel_dep(name = "googletest", version = "1.14.0", repo_name = "com_google_googletest")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name = "com_google_googletest")
bazel_dep(name = "with_cfg.bzl", version = "0.2.4")

# TODO(pcloudy): Add remoteapis and googleapis as Bazel modules in the BCR.
Expand All @@ -56,7 +56,7 @@ local_path_override(
# The following Bazel modules are not direct dependencies for building Bazel,
# but are required for visibility from DIST_ARCHIVE_REPOS in repositories.bzl
bazel_dep(name = "apple_support", version = "1.8.1")
bazel_dep(name = "abseil-cpp", version = "20230125.1")
bazel_dep(name = "abseil-cpp", version = "20240116.2")
bazel_dep(name = "c-ares", version = "1.15.0")
bazel_dep(name = "rules_go", version = "0.39.1")
bazel_dep(name = "rules_kotlin", version = "1.9.0")
Expand Down
164 changes: 131 additions & 33 deletions MODULE.bazel.lock

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

Loading

0 comments on commit 1e8ff63

Please sign in to comment.