Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1.46 KB

scala_import.md

File metadata and controls

31 lines (26 loc) · 1.46 KB

scala_import

scala_import(
    name,
    jars,
    deps,
    runtime_deps,
    exports,
    neverlink,
    srcjar
)

scala_import enables the use of precompiled Scala .jar files as dependencies for other Scala rules like 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.

Attributes

Attribute name Description
name Name, required
A unique name for this target.
jars List of labels, required
List of .jar files to import, usually in //external. In practice, this usually corresponds to one jar.
deps List of labels, optional
Compile time dependencies that were used to create the jar.
runtime_deps List of labels, optional
Runtime dependencies that are needed for this library.
exports List of labels, optional
List of targets to add to the dependencies of those that depend on this target.
neverlink boolean, optional (default False)
If true only use this library for compilation and not at runtime.
srcjar Label, optional
The source jar that was used to create the jar.