Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rules_jvm_external #1670

Open
jadenPete opened this issue Dec 9, 2024 · 0 comments
Open

Use rules_jvm_external #1670

jadenPete opened this issue Dec 9, 2024 · 0 comments

Comments

@jadenPete
Copy link

This issue is part of a broader proposal to merge some of the features in lucidsoftware/rules_scala into this ruleset.

The tracking issue for this effort

The relevant proposal section.

From the proposal:

bazelbuild/rules_scala uses the following rules/macros for fetching external dependencies from Maven (see scala/scala_maven_import_external.bzl).

  • java_import_external
  • jvm_import_external
  • jvm_maven_import_external
  • scala_import_external
  • scala_maven_import_external

The java_* and jvm_* rules/macros are copied from bazelbuild/bazel (see jvm.bzl and java.bzl), and the scala_* macros use them under the hood.

Today, rules_jvm_external is the standard for fetching external Java and Scala dependencies built with build systems other than Bazel (e.g. Maven), and, in lucidsoftware/rules_scala it’s worked quite well for us. The main advantages are:

  • Using external dependencies is as simple as importing rules_jvm_external
  • Downloaded artifacts, their checksums, and their versions are “pinned” into a file checked into the repository
  • External dependencies can be declared in a single maven_install target instead of each having to be declared in a separate target
  • It supports Bzlmod, which should ease a future migration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant