bazel build //path/to/my/library:my_favorite_scala_library builds a "skinny" JAR as expected and doesn't package in any dependencies or exports.
Building a _deploy.jar will package in all transitive dependencies.
Is there a simple way to have some middle ground where I can build a JAR that will package in only the main source AND any exports, either using the exports functionality or some other Bazel functionality that I may be overlooking? I'm open to both some custom invocation of a bazel build command or some field/functionality on the rule definitions that I may not be aware of.
Apologies for reposting but I was getting no traction on StackOverflow after a week, and so I'm hoping for some guidance from the folks in this repository. Reposting from: https://stackoverflow.com/questions/75933481/using-rules-scala-bazel-how-to-bundle-transitive-jars-that-are-exported-as
Let's say I have a library such as:
bazel build //path/to/my/library:my_favorite_scala_library
builds a "skinny" JAR as expected and doesn't package in any dependencies or exports.Building a
_deploy.jar
will package in all transitive dependencies.Is there a simple way to have some middle ground where I can build a JAR that will package in only the main source AND any exports, either using the
exports
functionality or some other Bazel functionality that I may be overlooking? I'm open to both some custom invocation of abazel build
command or some field/functionality on the rule definitions that I may not be aware of.