Fix the bridge selection

This commit is contained in:
Eugene Yokota 2017-03-23 15:51:16 -04:00
parent b6d8b565de
commit e6d11ed83d
1 changed files with 6 additions and 0 deletions

View File

@ -18,12 +18,18 @@ object Compiler {
val DefaultMaxErrors = 100
private[sbt] def defaultCompilerBridgeSource(sv: String): ModuleID =
VersionNumber(sv) match {
// 2.10 and before
case VersionNumber(ns, _, _) if (ns.size == 3) && (ns(0) == 2) && (ns(1) <= 10) => scalaCompilerBridgeSource2_10
// 2.11
case VersionNumber(ns, _, _) if (ns.size == 3) && (ns(0) == 2) && (ns(1) == 11) => scalaCompilerBridgeSource2_11
case _ => scalaCompilerBridgeSource2_12
}
private[sbt] def scalaCompilerBridgeSource2_10: ModuleID =
ModuleID(xsbti.ArtifactInfo.SbtOrganization, "compiler-bridge_2.10",
ComponentCompiler.incrementalVersion).withConfigurations(Some("component")).sources()
private[sbt] def scalaCompilerBridgeSource2_11: ModuleID =
ModuleID(xsbti.ArtifactInfo.SbtOrganization, "compiler-bridge_2.11",
ComponentCompiler.incrementalVersion).withConfigurations(Some("component")).sources()
private[sbt] def scalaCompilerBridgeSource2_12: ModuleID =
ModuleID(xsbti.ArtifactInfo.SbtOrganization, "compiler-bridge_2.12",
ComponentCompiler.incrementalVersion).withConfigurations(Some("component")).sources()