sbt, the interactive build tool
Go to file
Eugene Yokota c22cb34e7b Make CrossVersion.Disabled stable
Fixes https://github.com/sbt/sbt/issues/4975

This makes `CrossVersion.Disabled` a stable identifier by reverting `final def` back to `final val`.

This is to fix Scala.JS build

```
[error] ScalaJSCrossVersion.scala:34:23: stable identifier required, but sbt.`package`.CrossVersion.Disabled found.
[error]     case CrossVersion.Disabled =>
[error]                       ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
```

### notes

- #121 added `final val Disabled = sbt.librarymanagement.Disabled` but it was just a companion object
- #280 actually made it `final val Disabled = sbt.librarymanagement.Disabled()`, but this broke Cat's build that was calling `CrossVersion.Disabled()`
- #290 changed to `final def Disabled = sbt.librarymanagement.Disabled` and `object Disabled extends sbt.librarymanagement.Disabled`
- This changes back to `final val Disabled = sbt.librarymanagement.Disabled` (but because we changed the companion object in #290 that's ok)
2019-08-22 01:54:14 -04:00
bin fixpreloaded.sh 2019-05-09 23:54:01 -04:00
core Make CrossVersion.Disabled stable 2019-08-22 01:54:14 -04:00
ivy/src Remove lmCommonTest 2019-08-17 23:55:58 -04:00
notes Library management API 2017-07-15 11:17:23 -04:00
project bump modules 2019-08-18 23:56:20 -04:00
scripted-test/src/sbt-test/lmScriptedTest adding multi-project test 2018-10-28 08:54:26 +00:00
.gitignore fix 2018-10-16 12:35:23 +01:00
.java-version Cross publish to Scala 2.12 2017-01-07 00:49:45 -05:00
.scalafmt.conf Deprecate HTTP resolvers 2019-08-01 16:20:22 -04:00
.travis.yml use head -1 2019-08-01 17:47:38 -04:00
README.md rename to DependencyResolutionInterface 2017-07-15 11:17:23 -04:00
build.sbt Remove lmCommonTest 2019-08-17 23:55:58 -04:00
sbt-allsources.sh sbt-contraband 0.3.0-M4 2017-03-17 23:03:37 -04:00

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))