Use Scala 2.12 for all sbt 1.x, not just 1.0.x

This commit is contained in:
Dale Wijnand 2017-06-27 14:13:16 +01:00
parent c85fbbf215
commit 27615b8fa8
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
2 changed files with 3 additions and 4 deletions

View File

@ -385,8 +385,6 @@ object Defaults extends BuildCommon {
IvyActions.cleanCachedResolutionCache(ivyModule.value, streams.value.log)
},
scalaCompilerBridgeSource := {
// This is a workaround for sbtVersion getting set to another value.
val sv = appConfiguration.value.provider.id.version
if (ScalaInstance.isDotty(scalaVersion.value))
// Maintained at https://github.com/lampepfl/dotty/tree/master/sbt-bridge
ModuleID(scalaOrganization.value, "dotty-sbt-bridge", scalaVersion.value)
@ -414,7 +412,7 @@ object Defaults extends BuildCommon {
VersionNumber(sv) match {
case VersionNumber(Seq(0, 12, _*), _, _) => "2.9.2"
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")
}

View File

@ -10,7 +10,6 @@ package sbt
import sbt.internal.util.complete.{ Parser, DefaultParsers }
import DefaultParsers._
import sbt.Keys._
import Project._
import Scope.GlobalScope
import Def.ScopedKey
import sbt.internal.Load
@ -31,11 +30,13 @@ private[sbt] object PluginCross {
switchArgs & nextSpaced
}
}
def crossExclude(s: Def.Setting[_]): Boolean =
s.key match {
case ScopedKey(Scope(_, _, pluginCrossBuild.key, _), sbtVersion.key) => true
case _ => false
}
Command.arb(requireSession(switchParser), pluginSwitchHelp) {
case (state, (version, command)) =>
val x = Project.extract(state)