This project is a small wrapper around the library APIs for Coursier with the objective to provide a stable binary compatible interface.
- never break binary compatibility
- no transitive dependencies besides scala-library, coursier is shaded into an internal namespace
- support the full coursier library API, if you need advanced configuration such as authentication or custom cache locations use Coursier directly.
// Supports 2.10, 2.11 and 2.12 libraryDependencies += "com.geirsson" %% "coursier-small" % "VERSION"
Then use it like this
import com.geirsson.coursiersmall._ val dependency = new Dependency("com.geirsson", "scalafmt-cli_2.12", "1.5.1") val settings = new Settings() .withDependencies(List(dependency)) val jars = CoursierSmall.fetch(settings) // List(~/.coursier/cache/.../scalafmt-cli_2.12-1.5.1.jar, ...)
In case of resolution or file errors, the exceptions
FileException are thrown.