mirror of https://github.com/sbt/sbt.git
- When major, minor, and patch are equal, a pre-release version has lower precedence than a normal version. Example: 1.0.0-alpha < 1.0.0. - Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each <del>dot</del> hyphen separated identifier from left to right until a difference is found as follows - identifiers consisting of only digits are compared numerically and identifiers with letters or hyphens are compared lexically in ASCII sort order. - Numeric identifiers always have lower precedence than non-numeric identifiers. - A larger set of pre-release fields has a higher precedence than a smaller set, if all of the preceding identifiers are equal. - Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0. https://semver.org/#spec-item-11 |
||
|---|---|---|
| common-test/src/main/scala/sbt/internal/librarymanagement | ||
| core | ||
| ivy/src | ||
| notes | ||
| project | ||
| .gitignore | ||
| .java-version | ||
| .scalafmt.conf | ||
| .travis.yml | ||
| README.md | ||
| build.sbt | ||
| sbt-allsources.sh | ||
README.md
librarymanagement module for sbt
scala> import java.io.File
import java.io.File
scala> import sbt.librarymanagement._, syntax._
import sbt.librarymanagement._
import syntax._
scala> val log = sbt.util.LogExchange.logger("test")
log: sbt.internal.util.ManagedLogger = sbt.internal.util.ManagedLogger@c439b0f
scala> val lm = {
import sbt.librarymanagement.ivy._
val ivyConfig = InlineIvyConfiguration().withLog(log)
IvyDependencyResolution(ivyConfig)
}
lm: sbt.librarymanagement.DependencyResolution = sbt.librarymanagement.DependencyResolution@6a9b40f8
scala> val module = "commons-io" % "commons-io" % "2.5"
module: sbt.librarymanagement.ModuleID = commons-io:commons-io:2.5
scala> lm.retrieve(module, scalaModuleInfo = None, new File("target"), log)
res0: Either[sbt.librarymanagement.UnresolvedWarning,Vector[java.io.File]] = Right(Vector(target/jars/commons-io/commons-io/commons-io-2.5.jar, target/jars/commons-io/commons-io/commons-io-2.5.jar, target/jars/commons-io/commons-io/commons-io-2.5.jar))