Skip to content

Commit 6b4a260

Browse files
committed
Remove snapshotScalaBinaryVersion
It only has an effect if the Scala version number is exactly 2.11.0-SNAPSHOT. For 2.11.x-SNAPSHOT with x > 0, sbt already sets the scalaBinaryVersion to 2.11. Note that our nightly release builds don't use -SNAPSHOT for the Scala version, but something like 2.12.0-[sha]-nightly.
1 parent 5085eae commit 6b4a260

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/main/scala/ScalaModulePlugin.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,19 @@ import com.typesafe.sbt.osgi.{OsgiKeys, SbtOsgi}
44
import com.typesafe.tools.mima.plugin.{MimaPlugin, MimaKeys}
55

66
object ScalaModulePlugin extends Plugin {
7-
val snapshotScalaBinaryVersion = settingKey[String]("The Scala binary version to use when building against Scala SNAPSHOT.")
87
val repoName = settingKey[String]("The name of the repository under github.com/scala/.")
98
val mimaPreviousVersion = settingKey[Option[String]]("The version of this module to compare against when running MiMa.")
109

1110
private val canRunMima = taskKey[Boolean]("Decides if MiMa should run.")
1211
private val runMimaIfEnabled = taskKey[Unit]("Run MiMa if mimaPreviousVersion and the module can be resolved against the current scalaBinaryVersion.")
1312

14-
def deriveBinaryVersion(sv: String, snapshotScalaBinaryVersion: String) = sv match {
15-
case snap_211 if snap_211.startsWith("2.11") &&
16-
snap_211.contains("-SNAPSHOT") => snapshotScalaBinaryVersion
17-
case sv => sbt.CrossVersion.binaryScalaVersion(sv)
18-
}
19-
2013
lazy val scalaModuleSettings: Seq[Setting[_]] = Seq(
2114
repoName := name.value,
2215

2316
mimaPreviousVersion := None,
2417

2518
organization := "org.scala-lang.modules",
2619

27-
scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value),
28-
2920
// so we don't have to wait for sonatype to synch to maven central when deploying a new module
3021
resolvers += Resolver.sonatypeRepo("releases"),
3122

0 commit comments

Comments
 (0)