scala_import( name, jars, deps, runtime_deps, exports, neverlink, srcjar, stamp, )
scala_import enables the use of precompiled Scala .jar files as dependencies for other Scala rules
scala_library, similar to
java_import from Java rules.
This rule reimplements
java_import without support for ijars, which break Scala macros.
Generally, ijars don’t help much for external dependencies, which rarely change.
The jar's compile MANIFEST.MF is stamped with a Target-Label attribute for dependency tracking reporting.
Configuring stamping behavior
This behaviour can be changed per
scala_import target with an attribute or globally
with a setting:
bazel build //my:target --@io_bazel_rules_scala//scala/settings:stamp_scala_import=False
A unique name for this target.
List of .jar files to import, usually in
Compile time dependencies that were used to create the jar.
Runtime dependencies that are needed for this library.
List of targets to add to the dependencies of those that depend on this target.
If true only use this library for compilation and not at runtime.
The source jar that was used to create the jar.
Setting to control Target-Label stamping into compile jar Manifest
Default value is