add overload of addSbtPlugin for explicitly specifying the sbt cross-version

This commit is contained in:
Mark Harrah 2012-03-17 19:31:55 -04:00
parent 2c5a2f0f96
commit 7768aaacb0
1 changed files with 2 additions and 0 deletions

View File

@ -1198,6 +1198,8 @@ trait BuildExtra extends BuildCommon
def compose(setting: SettingKey[State => State], f: State => State) = setting in Global ~= (_ compose f)
Seq( compose(onLoad, add), compose(onUnload, remove) )
}
def addSbtPlugin(dependency: ModuleID, sbtVersion: String): Setting[Seq[ModuleID]] =
libraryDependencies <+= (scalaBinaryVersion in update) { scalaV => sbtPluginExtra(dependency, sbtVersion, scalaV) }
def addSbtPlugin(dependency: ModuleID): Setting[Seq[ModuleID]] =
libraryDependencies <+= (sbtBinaryVersion in update,scalaBinaryVersion in update) { (sbtV, scalaV) => sbtPluginExtra(dependency, sbtV, scalaV) }