Skip to content

Commit 678358c

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 5ba5ea2 commit 678358c

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/main/scala/ScalaModulePlugin.scala

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +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-
// TODO add doc. not sure i really see the valid use case for this feature. yet.
8-
// - only relevant for x.y.0-SNAPSHOT, once x.y.0 is out, the binary ver of x.y.1-SNAPSHOT is x.y (patch is dropped)
9-
// - used when publishing using a scala snapshot. the module will not have SNAPSHOT in the scala binary version.
10-
// allows using a snapshot of the module more easily. eg if you're using scala 2.12.0-M1, you can say "org.scala-lang.modules" %% "scala-xml" % "1.0.2-SNAPSHOT"
11-
// - also used to resolve dependencies of modules. when building with a snapshot scala, deps will be resolved against this binver.
12-
val snapshotScalaBinaryVersion = settingKey[String]("The Scala binary version to use when building against Scala SNAPSHOT.")
137
val repoName = settingKey[String]("The name of the repository under github.com/scala/.")
148
val mimaPreviousVersion = settingKey[Option[String]]("The version of this module to compare against when running MiMa.")
159

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

19-
def deriveBinaryVersion(sv: String, snapshotScalaBinaryVersion: String) = sv match {
20-
case snap_211 if snap_211.startsWith("2.11") &&
21-
snap_211.contains("-SNAPSHOT") => snapshotScalaBinaryVersion
22-
case sv => sbt.CrossVersion.binaryScalaVersion(sv)
23-
}
24-
2513
lazy val scalaModuleSettings: Seq[Setting[_]] = Seq(
2614
repoName := name.value,
2715

2816
mimaPreviousVersion := None,
2917

3018
organization := "org.scala-lang.modules",
3119

32-
scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value),
33-
3420
// so we don't have to wait for sonatype to synch to maven central when deploying a new module
3521
resolvers += Resolver.sonatypeRepo("releases"),
3622

0 commit comments

Comments
 (0)