Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 8f14df193062e079f0caee43dbd586256ae43e76 1 parent be3d565
@jrudolph jrudolph authored committed
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)"))
Please sign in to comment.
Something went wrong with that request. Please try again.