Skip to content

Commit

Permalink
[java] Bumping versions for junit, netty, and opentelemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Jan 16, 2025
1 parent 7719d5f commit efe5a34
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 102 deletions.
44 changes: 37 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")
bazel_dep(name = "platforms", version = "0.0.10")

# Required for the closure rules
bazel_dep(name = "protobuf", version = "29.2", dev_dependency = True, repo_name = "com_google_protobuf")
bazel_dep(name = "protobuf", dev_dependency = True, repo_name = "com_google_protobuf", version = "29.2")

# Required for rules_rust to import the crates properly
bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)

bazel_dep(name = "rules_cc", dev_dependency = True, version = "0.0.9")
bazel_dep(name = "rules_dotnet", version = "0.17.5")
bazel_dep(name = "rules_java", version = "7.12.4")
bazel_dep(name = "rules_jvm_external", version = "6.6")
Expand All @@ -28,27 +27,33 @@ bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "rules_ruby", version = "0.13.0")

linter = use_extension("@apple_rules_lint//lint:extensions.bzl", "linter")

linter.configure(
name = "java-spotbugs",
config = "//java:spotbugs-config",
)

linter.configure(
name = "rust-rustfmt",
config = "//rust:enable-rustfmt",
)

linter.register(name = "rust-rustfmt")

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")

node.toolchain(node_version = "20.9.0")

pnpm = use_extension(
"@aspect_rules_js//npm:extensions.bzl",
"pnpm",
dev_dependency = True,
)

use_repo(pnpm, "pnpm")

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")

npm.npm_translate_lock(
name = "npm",
data = [
Expand All @@ -63,59 +68,76 @@ npm.npm_translate_lock(
update_pnpm_lock = True,
verify_node_modules_ignored = "//:.bazelignore",
)

use_repo(npm, "npm")

rules_ts_ext = use_extension(
"@aspect_rules_ts//ts:extensions.bzl",
"ext",
dev_dependency = True,
)

rules_ts_ext.deps(
ts_version = "4.9.5",
)

use_repo(rules_ts_ext, "npm_typescript")

esbuild = use_extension("@aspect_rules_esbuild//esbuild:extensions.bzl", "esbuild")

esbuild.toolchain(esbuild_version = "0.23.0")

use_repo(esbuild, "esbuild_toolchains")

register_toolchains("@esbuild_toolchains//:all")

dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")

dotnet.toolchain(dotnet_version = "8.0.203")

use_repo(dotnet, "dotnet_toolchains")

selenium_paket = use_extension("//dotnet:paket.nuget_extension.bzl", "nuget_extension")

use_repo(selenium_paket, "paket.nuget")

register_toolchains("@dotnet_toolchains//:all")

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")

oci.pull(
name = "java_image_base",
digest = "sha256:161a1d97d592b3f1919801578c3a47c8e932071168a96267698f4b669c24c76d",
image = "gcr.io/distroless/java17",
)

oci.pull(
name = "firefox_standalone",
digest = "sha256:b6d8279268b3183d0d33e667e82fec1824298902f77718764076de763673124f",
image = "index.docker.io/selenium/standalone-firefox",
)

oci.pull(
name = "chrome_standalone",
digest = "sha256:1b809a961a0a77787a7cccac74ddc5570b7e89747f925b8469ddb9a6624d4ece",
image = "index.docker.io/selenium/standalone-chrome",
)

use_repo(oci, "chrome_standalone", "firefox_standalone", "java_image_base")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")

python.toolchain(
is_default = True,
python_version = "3.9",
)

python.toolchain(python_version = "3.10")

python.toolchain(python_version = "3.11")

python.toolchain(python_version = "3.12")

use_repo(python, "pythons_hub")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
Expand All @@ -140,15 +162,16 @@ register_toolchains("@pythons_hub//:all")

# https://github.com/bazelbuild/rules_jvm_external/pull/1079
archive_override(
module_name = "rules_jvm_external",
integrity = "sha256-yS8Qes1PLbYbe10b1WSgl0Auqn/1Wlxg8O3wSr7a/Sg=",
module_name = "rules_jvm_external",
patch_strip = 1,
patches = ["//java:rules_jvm_external_javadoc.patch"],
strip_prefix = "rules_jvm_external-f572a26116c7ef71d8842dd056c2605782f7be8d",
urls = ["https://github.com/bazelbuild/rules_jvm_external/archive/f572a26116c7ef71d8842dd056c2605782f7be8d.tar.gz"],
)

java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")

use_repo(
java_toolchains,
"remote_java_tools",
Expand All @@ -165,6 +188,7 @@ use_repo(
)

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

maven.install(
name = "maven",
artifacts = [
Expand Down Expand Up @@ -224,9 +248,9 @@ maven.install(
"org.zeromq:jeromq:0.6.0",
],
boms = [
"io.opentelemetry:opentelemetry-bom:1.44.1",
"io.netty:netty-bom:4.1.115.Final",
"org.junit:junit-bom:5.11.3",
"io.opentelemetry:opentelemetry-bom:1.46.0",
"io.netty:netty-bom:4.1.117.Final",
"org.junit:junit-bom:5.11.4",
],
excluded_artifacts = [
"org.hamcrest:hamcrest-all", # Replaced by hamcrest 2
Expand All @@ -243,9 +267,11 @@ maven.install(
resolver = "maven",
strict_visibility = True,
)

use_repo(maven, "maven", "unpinned_maven")

ruby = use_extension("@rules_ruby//ruby:extensions.bzl", "ruby")

ruby.toolchain(
name = "ruby",
msys2_packages = [
Expand All @@ -254,6 +280,7 @@ ruby.toolchain(
],
version_file = "//:rb/.ruby-version",
)

ruby.bundle_fetch(
name = "bundle",
srcs = [
Expand Down Expand Up @@ -344,11 +371,13 @@ ruby.bundle_fetch(
gemfile = "//:rb/Gemfile",
gemfile_lock = "//:rb/Gemfile.lock",
)

use_repo(ruby, "bundle", "ruby", "ruby_toolchains")

register_toolchains("@ruby_toolchains//:all")

selenium_manager_artifacts = use_extension("//common:selenium_manager.bzl", "selenium_manager_artifacts")

use_repo(
selenium_manager_artifacts,
"download_sm_linux",
Expand All @@ -357,6 +386,7 @@ use_repo(
)

pin_browsers_extension = use_extension("//common:repositories.bzl", "pin_browsers_extension")

use_repo(
pin_browsers_extension,
"linux_beta_firefox",
Expand Down
Loading

0 comments on commit efe5a34

Please sign in to comment.