Permalink
Browse files

use the same logic for selecting extra attributes in addSbtPlugin as …

…in pluginProjectId

This enables us to use the same plugins.sbt in projects for release and
pre-release versions of sbt.
  • Loading branch information...
1 parent be3d565 commit 8f14df193062e079f0caee43dbd586256ae43e76 @jrudolph jrudolph committed with May 30, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 main/Defaults.scala
View
8 main/Defaults.scala
@@ -1225,9 +1225,13 @@ trait BuildExtra extends BuildCommon
def addSbtPlugin(dependency: ModuleID, sbtVersion: String, scalaVersion: String): Setting[Seq[ModuleID]] =
libraryDependencies += sbtPluginExtra(dependency, sbtVersion, scalaVersion)
def addSbtPlugin(dependency: ModuleID, sbtVersion: String): Setting[Seq[ModuleID]] =
- libraryDependencies <+= (scalaBinaryVersion in update) { scalaV => sbtPluginExtra(dependency, sbtVersion, scalaV) }
+ libraryDependencies <+= (scalaVersion in update, scalaBinaryVersion in update) { (scalaV, scalaBV) =>
+ sbtPluginExtra(dependency, sbtVersion, selectVersion(scalaV, scalaBV))
+ }
def addSbtPlugin(dependency: ModuleID): Setting[Seq[ModuleID]] =
- libraryDependencies <+= (sbtBinaryVersion in update,scalaBinaryVersion in update) { (sbtV, scalaV) => sbtPluginExtra(dependency, sbtV, scalaV) }
+ libraryDependencies <+= (sbtVersion in update, sbtBinaryVersion in update, scalaVersion in update, scalaBinaryVersion in update) { (sbtV, sbtBV, scalaV, scalaBV) =>
+ sbtPluginExtra(dependency, selectVersion(sbtV, sbtBV), selectVersion(scalaV, scalaBV))
+ }
def compilerPlugin(dependency: ModuleID): ModuleID =
dependency.copy(configurations = Some("plugin->default(compile)"))

0 comments on commit 8f14df1

Please sign in to comment.