olafurpg / coursier-small   1.3.3

Apache License 2.0 Website GitHub

This project is no longer needed since the new Coursier library API has gotten a lot nicer --->

Scala versions: 2.12 2.11 2.10

coursier-small

Build Status

This project is a small wrapper around the library APIs for Coursier with the objective to provide a stable binary compatible interface.

Goals:

  • never break binary compatibility
  • no transitive dependencies besides scala-library, coursier is shaded into an internal namespace

Non-goals:

  • support the full coursier library API, if you need advanced configuration such as authentication or custom cache locations use Coursier directly.

Usage

Maven Central

// 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 ResolutionException or FileException are thrown.