Update release notes

This commit is contained in:
Alexandre Archambault 2015-06-28 18:14:53 +02:00
parent 253a7d263d
commit cb9dfc5906
1 changed files with 23 additions and 22 deletions

View File

@ -9,33 +9,34 @@ Test it in your browser with its [Scala JS demo](https://alexarchambault.github.
### Overview ### Overview
Use it like Use it like:
```scala
val repositories = Seq( val repositories = Seq(
Repository.ivy2Local, Repository.ivy2Local,
Repository.mavenCentral Repository.mavenCentral
) )
val dependencies = Set( val dependencies = Set(
Dependency(Module("com.github.alexarchambault", "argonaut-shapeless_6.1_2.11"), "0.2.0"), Dependency(Module("com.github.alexarchambault", "argonaut-shapeless_6.1_2.11"), "0.2.0"),
Dependency(Module("com.github.alexarchambault", "shapeless-refined-std_2.11"), "0.1.1") Dependency(Module("com.github.alexarchambault", "shapeless-refined-std_2.11"), "0.1.1")
) )
val resolution = val resolution =
Resolution(dependencies) // Initial resolution state Resolution(dependencies) // Initial resolution state
.process // Resolution process (scalaz-stream like) .process // Resolution process (scalaz-stream like)
.run(repositories) // Run the resolution with these repositories .run(repositories) // Run the resolution with these repositories
.run // Run the resulting Task[Resolution] .run // Run the resulting Task[Resolution]
val allDependencies = resolution.minDependencies // Set[Dependency] // Let's inspect the results
val allArtifacts = resolution.artifacts // Seq[Artifact]
val errors = resolution.errors // Metadata errors (not found, malformed, ...) val allDependencies = resolution.minDependencies // Set[Dependency]
val conflicts = resolution.conflicts // Version conflicts val allArtifacts = resolution.artifacts // Seq[Artifact]
// URLs of the artifacts (JARs) val errors = resolution.errors // Metadata errors (not found, malformed, ...)
val allArtifactsUrls = allArtifacts.map(_.url) // Seq[String] val conflicts = resolution.conflicts // Version conflicts
```
// URLs of the artifacts (JARs)
val allArtifactsUrls = allArtifacts.map(_.url) // Seq[String]
Both metadata and artifacts can be cached. Resolution per se only fetches Both metadata and artifacts can be cached. Resolution per se only fetches
metadata, and gives you back artifact URLs. metadata, and gives you back artifact URLs.