Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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.
  • Loading branch information
lrytz committed Apr 29, 2015
commit 5ec3a7a40bff985fe5ee5333fb024f63da61a5c0
9 changes: 0 additions & 9 deletions src/main/scala/ScalaModulePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,19 @@ import com.typesafe.sbt.osgi.{OsgiKeys, SbtOsgi}
import com.typesafe.tools.mima.plugin.{MimaPlugin, MimaKeys}

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

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

def deriveBinaryVersion(sv: String, snapshotScalaBinaryVersion: String) = sv match {
case snap_211 if snap_211.startsWith("2.11") &&
snap_211.contains("-SNAPSHOT") => snapshotScalaBinaryVersion
case sv => sbt.CrossVersion.binaryScalaVersion(sv)
}

lazy val scalaModuleSettings: Seq[Setting[_]] = Seq(
repoName := name.value,

mimaPreviousVersion := None,

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

scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value),

// so we don't have to wait for sonatype to synch to maven central when deploying a new module
resolvers += Resolver.sonatypeRepo("releases"),

Expand Down