mirror of https://github.com/sbt/sbt.git
Merge pull request #7765 from xuwei-k/sbtVersion-in-pluginCrossBuild
fix old `in` syntax
This commit is contained in:
commit
fd52e28492
|
|
@ -700,8 +700,8 @@ object Defaults extends BuildCommon {
|
||||||
pluginCrossBuild / sbtBinaryVersion := binarySbtVersion(
|
pluginCrossBuild / sbtBinaryVersion := binarySbtVersion(
|
||||||
(pluginCrossBuild / sbtVersion).value
|
(pluginCrossBuild / sbtVersion).value
|
||||||
),
|
),
|
||||||
// Use (sbtVersion in pluginCrossBuild) to pick the sbt module to depend from the plugin.
|
// Use (pluginCrossBuild / sbtVersion) to pick the sbt module to depend from the plugin.
|
||||||
// Because `sbtVersion in pluginCrossBuild` can be scoped to project level,
|
// Because `pluginCrossBuild / sbtVersion` can be scoped to project level,
|
||||||
// this setting needs to be set here too.
|
// this setting needs to be set here too.
|
||||||
pluginCrossBuild / sbtDependency := {
|
pluginCrossBuild / sbtDependency := {
|
||||||
val app = appConfiguration.value
|
val app = appConfiguration.value
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ object Keys {
|
||||||
val sbtPlugin = settingKey[Boolean]("If true, enables adding sbt as a dependency and auto-generation of the plugin descriptor file.").withRank(BMinusSetting)
|
val sbtPlugin = settingKey[Boolean]("If true, enables adding sbt as a dependency and auto-generation of the plugin descriptor file.").withRank(BMinusSetting)
|
||||||
val isMetaBuild = settingKey[Boolean]("If true, this is a metabuild, a project inside project/ directory, and sbt is added to the classpath.").withRank(DSetting)
|
val isMetaBuild = settingKey[Boolean]("If true, this is a metabuild, a project inside project/ directory, and sbt is added to the classpath.").withRank(DSetting)
|
||||||
val reresolveSbtArtifacts = settingKey[Boolean]("If true, include sbt into the metabuild dependency graph. Otherwise reuse the artifacts resolved by the launcher on startup.").withRank(DSetting)
|
val reresolveSbtArtifacts = settingKey[Boolean]("If true, include sbt into the metabuild dependency graph. Otherwise reuse the artifacts resolved by the launcher on startup.").withRank(DSetting)
|
||||||
val pluginCrossBuild = taskKey[Unit]("Dummy task to scope `sbtVersion in pluginCrossBuild`, which gets used for plugin compilation.")
|
val pluginCrossBuild = taskKey[Unit]("Dummy task to scope `pluginCrossBuild / sbtVersion`, which gets used for plugin compilation.")
|
||||||
val crossSbtVersions = settingKey[Seq[String]]("The versions of Sbt used when cross-building an sbt plugin.")
|
val crossSbtVersions = settingKey[Seq[String]]("The versions of Sbt used when cross-building an sbt plugin.")
|
||||||
val printWarnings = taskKey[Unit]("Shows warnings from compilation, including ones that weren't printed initially.").withRank(BPlusTask)
|
val printWarnings = taskKey[Unit]("Shows warnings from compilation, including ones that weren't printed initially.").withRank(BPlusTask)
|
||||||
val fileInputOptions = settingKey[Seq[String]]("Options that take file input, which may invalidate the cache.").withRank(CSetting)
|
val fileInputOptions = settingKey[Seq[String]]("Options that take file input, which may invalidate the cache.").withRank(CSetting)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ private[sbt] object PluginCross {
|
||||||
case (state, (version, command)) =>
|
case (state, (version, command)) =>
|
||||||
val x = Project.extract(state)
|
val x = Project.extract(state)
|
||||||
import x._
|
import x._
|
||||||
state.log.info(s"Setting `sbtVersion in pluginCrossBuild` to $version")
|
state.log.info(s"Setting `pluginCrossBuild / sbtVersion` to $version")
|
||||||
val add = List(GlobalScope / pluginCrossBuild / sbtVersion :== version) ++
|
val add = List(GlobalScope / pluginCrossBuild / sbtVersion :== version) ++
|
||||||
List(scalaVersion := scalaVersionSetting.value) ++
|
List(scalaVersion := scalaVersionSetting.value) ++
|
||||||
inScope(GlobalScope.copy(project = Select(currentRef)))(
|
inScope(GlobalScope.copy(project = Select(currentRef)))(
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,7 @@ $SwitchCommand [<scala-version>=]<scala-home>[!] [-v] [<command>]
|
||||||
Runs <command> for each sbt version specified for cross-building.
|
Runs <command> for each sbt version specified for cross-building.
|
||||||
|
|
||||||
For each string in `crossSbtVersions` in the current project, this command sets the
|
For each string in `crossSbtVersions` in the current project, this command sets the
|
||||||
`sbtVersion in pluginCrossBuild` of all projects to that version, reloads the build,
|
`pluginCrossBuild / sbtVersion` of all projects to that version, reloads the build,
|
||||||
and executes <command>. When finished, it reloads the build with the original
|
and executes <command>. When finished, it reloads the build with the original
|
||||||
Scala version.
|
Scala version.
|
||||||
|
|
||||||
|
|
@ -418,7 +418,7 @@ $SwitchCommand [<scala-version>=]<scala-home>[!] [-v] [<command>]
|
||||||
s"""$PluginSwitchCommand <sbt-version> [<command>]
|
s"""$PluginSwitchCommand <sbt-version> [<command>]
|
||||||
Changes the sbt version and runs a command.
|
Changes the sbt version and runs a command.
|
||||||
|
|
||||||
Sets the `sbtVersion in pluginCrossBuild` of all projects to <sbt-version> and
|
Sets the `pluginCrossBuild / sbtVersion` of all projects to <sbt-version> and
|
||||||
reloads the build. If <command> is provided, it is then executed.
|
reloads the build. If <command> is provided, it is then executed.
|
||||||
|
|
||||||
See also `help $CrossCommand`
|
See also `help $CrossCommand`
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ def mkCheck(scalaBinV: String, sbtBinVer: String, sbtVerPrefix: String) = Def.ta
|
||||||
scalaBinaryVersion.value == scalaBinV,
|
scalaBinaryVersion.value == scalaBinV,
|
||||||
s"Wrong Scala binary version: ${scalaBinaryVersion.value}"
|
s"Wrong Scala binary version: ${scalaBinaryVersion.value}"
|
||||||
)
|
)
|
||||||
assert(crossV startsWith sbtVerPrefix, s"Wrong `sbtVersion in pluginCrossBuild`: $crossV")
|
assert(crossV startsWith sbtVerPrefix, s"Wrong `pluginCrossBuild / sbtVersion`: $crossV")
|
||||||
|
|
||||||
val ur = update.value
|
val ur = update.value
|
||||||
val cr = ur.configuration(Compile).get
|
val cr = ur.configuration(Compile).get
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue