bazel-contrib / rules_jvm_external

Bazel rules to resolve, fetch and export Maven artifacts
Apache License 2.0
337 stars 256 forks source link

`rules_java` `v8.5.0` onwards requires a different WORKSPACE setup #1283

Open hvadehra opened 1 day ago

hvadehra commented 1 day ago

After moving all the rules / providers into @rules_java it became impossible to have both rules_java_dependencies and rules_java_toolchains in the same bzl file, without introducing a skyframe cycle.

With Bazel 8.0.0 (that includes rules_java 8.5.0), the WORKSPACE suffix uses the new bzl file(s). Any usages of the (deprecated) rules_java_dependencies function in repositories.bzl will cause Bazel to print:

DEBUG: .../external/rules_java/java/repositories.bzl:367:10: DEPRECATED: use rules_java_dependencies() from rules_java_deps.bzl

See https://github.com/bazelbuild/rules_java/releases/tag/8.5.0 for an example of the new setup.