Please note The lock file format was changed in rules_jvm_external 5.1 and in 6.10. If you update and repin your dependencies, your lock file will use the new format.
Usage
This version of rules_jvm_external requires Bazel 7.7.1 or Bazel 8.7.0 or Bazel 9.
This release requires Java 11 or above to run, both as the host JDK and the build and tool JDK.
Bzlmod
In your MODULE.bazel file:
bazel_dep(name = "rules_jvm_external", version = "7.1")To add dependencies, later in your MODULE.bazel file:
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"org.seleniumhq.selenium:selenium-java:4.46.0",
],
lock_file = "//:maven_install.json",
)
use_repo(maven, "maven")Using dependencies
In your BUILD.bazel file, reference the targets directly:
java_library(
name = "example",
exports = [
"@maven//:org_seleniumhq_selenium_selenium_java",
],
)What's Changed
- Prefer getenv to env.get by @Andrius-B in #1568
- update environment variable handling for pinning by @titusfortner in #1573
- Fix MavenPublisher to support POM-only publications by @titusfortner in #1574
- Update Gradle to 9.5.0 by @shs96c in #1569
- Fix link to docs/bzlmod.md in README.md by @styurin in #1564
- Fix GitHub search query in README by @collinfunk in #1550
- fix: resolve concurrent NPE in ErrorReportingListener (#1152) by @tharakadesilva in #1546
- Run jvm_import jar tools with exec Java by @dzbarsky in #1583
- Refactor: carry a
ResolvedArtifactfor every resolution node when resolving by @shs96c in #1585 - Make
amend_artifactalso match BOMs by @shs96c in #1586 - Allow boms to be defined in the gradle version catalogues by @shs96c in #1543
- Apply Maven exclusions to generated deps by @shs96c in #1594
- Fix BOM-only pinning by @shs96c in #1592
- Fix null shasum artifacts in v3 locks by @shs96c in #1591
- Preserve compound archive extensions when publishing by @shs96c in #1590
- Fix resolver NPE for non-binary artifacts by @shs96c in #1595
- Fix TOML AAR overrides using original artifact copy targets by @Bencodes in #1600
- Stop Gradle daemons after dependency resolution by @shs96c in #1598
- Index top-level kotlin functions, properties and type aliases properly. by @shs96c in #1599
- Skip package-info.class when indexing jars by @shs96c in #1597
- Don't deduplicate additional_coursier_options by @Dolfik1 in #1596
- Enable RJE_UNSAFE_CACHE by default by @shs96c in #1584
- fix: make :outdated work when runfiles trees are disabled by @shs96c in #1602
- Preserve Gradle test-fixtures variants by @shs96c in #1576
- feat: Support pluggable dependency download and metadata caching SPIs by @JonathanPerry651 in #1589
- Honour pinned versions in external resolvers by @shs96c in #1606
- BOM/POM coordinates condition marked as
skippedmust not be turned into http_file downloads by @mikhail-0330 in #1604 - Use a UTF-8 locale for jvm_import jar actions by @dzbarsky in #1610
New Contributors
- @Andrius-B made their first contribution in #1568
- @titusfortner made their first contribution in #1573
- @styurin made their first contribution in #1564
- @collinfunk made their first contribution in #1550
- @tharakadesilva made their first contribution in #1546
- @Dolfik1 made their first contribution in #1596
- @mikhail-0330 made their first contribution in #1604
Full Changelog: 7.0...7.1