mirror of https://github.com/sbt/sbt.git
Update release notes
This commit is contained in:
parent
253a7d263d
commit
cb9dfc5906
|
|
@ -9,33 +9,34 @@ Test it in your browser with its [Scala JS demo](https://alexarchambault.github.
|
|||
|
||||
### Overview
|
||||
|
||||
Use it like
|
||||
```scala
|
||||
val repositories = Seq(
|
||||
Repository.ivy2Local,
|
||||
Repository.mavenCentral
|
||||
)
|
||||
Use it like:
|
||||
|
||||
val dependencies = Set(
|
||||
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")
|
||||
)
|
||||
val repositories = Seq(
|
||||
Repository.ivy2Local,
|
||||
Repository.mavenCentral
|
||||
)
|
||||
|
||||
val resolution =
|
||||
Resolution(dependencies) // Initial resolution state
|
||||
.process // Resolution process (scalaz-stream like)
|
||||
.run(repositories) // Run the resolution with these repositories
|
||||
.run // Run the resulting Task[Resolution]
|
||||
val dependencies = Set(
|
||||
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")
|
||||
)
|
||||
|
||||
val allDependencies = resolution.minDependencies // Set[Dependency]
|
||||
val allArtifacts = resolution.artifacts // Seq[Artifact]
|
||||
val resolution =
|
||||
Resolution(dependencies) // Initial resolution state
|
||||
.process // Resolution process (scalaz-stream like)
|
||||
.run(repositories) // Run the resolution with these repositories
|
||||
.run // Run the resulting Task[Resolution]
|
||||
|
||||
val errors = resolution.errors // Metadata errors (not found, malformed, ...)
|
||||
val conflicts = resolution.conflicts // Version conflicts
|
||||
// Let's inspect the results
|
||||
|
||||
// URLs of the artifacts (JARs)
|
||||
val allArtifactsUrls = allArtifacts.map(_.url) // Seq[String]
|
||||
```
|
||||
val allDependencies = resolution.minDependencies // Set[Dependency]
|
||||
val allArtifacts = resolution.artifacts // Seq[Artifact]
|
||||
|
||||
val errors = resolution.errors // Metadata errors (not found, malformed, ...)
|
||||
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
|
||||
metadata, and gives you back artifact URLs.
|
||||
|
|
|
|||
Loading…
Reference in New Issue