mirror of https://github.com/sbt/sbt.git
Merge pull request #3293 from dwijnand/scala212FromSbtVersion1xx
Use Scala 2.12 for all sbt 1.x, not just 1.0.x
This commit is contained in:
commit
9d8bba31f8
|
|
@ -388,8 +388,6 @@ object Defaults extends BuildCommon {
|
||||||
IvyActions.cleanCachedResolutionCache(ivyModule.value, streams.value.log)
|
IvyActions.cleanCachedResolutionCache(ivyModule.value, streams.value.log)
|
||||||
},
|
},
|
||||||
scalaCompilerBridgeSource := {
|
scalaCompilerBridgeSource := {
|
||||||
// This is a workaround for sbtVersion getting set to another value.
|
|
||||||
val sv = appConfiguration.value.provider.id.version
|
|
||||||
if (ScalaInstance.isDotty(scalaVersion.value))
|
if (ScalaInstance.isDotty(scalaVersion.value))
|
||||||
// Maintained at https://github.com/lampepfl/dotty/tree/master/sbt-bridge
|
// Maintained at https://github.com/lampepfl/dotty/tree/master/sbt-bridge
|
||||||
ModuleID(scalaOrganization.value, "dotty-sbt-bridge", scalaVersion.value)
|
ModuleID(scalaOrganization.value, "dotty-sbt-bridge", scalaVersion.value)
|
||||||
|
|
@ -417,7 +415,7 @@ object Defaults extends BuildCommon {
|
||||||
VersionNumber(sv) match {
|
VersionNumber(sv) match {
|
||||||
case VersionNumber(Seq(0, 12, _*), _, _) => "2.9.2"
|
case VersionNumber(Seq(0, 12, _*), _, _) => "2.9.2"
|
||||||
case VersionNumber(Seq(0, 13, _*), _, _) => "2.10.6"
|
case VersionNumber(Seq(0, 13, _*), _, _) => "2.10.6"
|
||||||
case VersionNumber(Seq(1, 0, _*), _, _) => "2.12.2"
|
case VersionNumber(Seq(1, _, _*), _, _) => "2.12.2"
|
||||||
case _ => sys.error(s"Unsupported sbt binary version: $sv")
|
case _ => sys.error(s"Unsupported sbt binary version: $sv")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ package sbt
|
||||||
import sbt.internal.util.complete.{ Parser, DefaultParsers }
|
import sbt.internal.util.complete.{ Parser, DefaultParsers }
|
||||||
import DefaultParsers._
|
import DefaultParsers._
|
||||||
import sbt.Keys._
|
import sbt.Keys._
|
||||||
import Project._
|
|
||||||
import Scope.GlobalScope
|
import Scope.GlobalScope
|
||||||
import Def.ScopedKey
|
import Def.ScopedKey
|
||||||
import sbt.internal.Load
|
import sbt.internal.Load
|
||||||
|
|
@ -31,11 +30,13 @@ private[sbt] object PluginCross {
|
||||||
switchArgs & nextSpaced
|
switchArgs & nextSpaced
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def crossExclude(s: Def.Setting[_]): Boolean =
|
def crossExclude(s: Def.Setting[_]): Boolean =
|
||||||
s.key match {
|
s.key match {
|
||||||
case ScopedKey(Scope(_, _, pluginCrossBuild.key, _), sbtVersion.key) => true
|
case ScopedKey(Scope(_, _, pluginCrossBuild.key, _), sbtVersion.key) => true
|
||||||
case _ => false
|
case _ => false
|
||||||
}
|
}
|
||||||
|
|
||||||
Command.arb(requireSession(switchParser), pluginSwitchHelp) {
|
Command.arb(requireSession(switchParser), pluginSwitchHelp) {
|
||||||
case (state, (version, command)) =>
|
case (state, (version, command)) =>
|
||||||
val x = Project.extract(state)
|
val x = Project.extract(state)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue