fix old `in` syntax

This commit is contained in:
xuwei-k 2024-10-15 14:54:52 +09:00
parent b3a7eab060
commit 6372c2056a
5 changed files with 7 additions and 7 deletions

View File

@ -700,8 +700,8 @@ object Defaults extends BuildCommon {
pluginCrossBuild / sbtBinaryVersion := binarySbtVersion(
(pluginCrossBuild / sbtVersion).value
),
// Use (sbtVersion in pluginCrossBuild) to pick the sbt module to depend from the plugin.
// Because `sbtVersion in pluginCrossBuild` can be scoped to project level,
// Use (pluginCrossBuild / sbtVersion) to pick the sbt module to depend from the plugin.
// Because `pluginCrossBuild / sbtVersion` can be scoped to project level,
// this setting needs to be set here too.
pluginCrossBuild / sbtDependency := {
val app = appConfiguration.value

View File

@ -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 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 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 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)

View File

@ -46,7 +46,7 @@ private[sbt] object PluginCross {
case (state, (version, command)) =>
val x = Project.extract(state)
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) ++
List(scalaVersion := scalaVersionSetting.value) ++
inScope(GlobalScope.copy(project = Select(currentRef)))(

View File

@ -407,7 +407,7 @@ $SwitchCommand [<scala-version>=]<scala-home>[!] [-v] [<command>]
Runs <command> for each sbt version specified for cross-building.
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
Scala version.
@ -418,7 +418,7 @@ $SwitchCommand [<scala-version>=]<scala-home>[!] [-v] [<command>]
s"""$PluginSwitchCommand <sbt-version> [<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.
See also `help $CrossCommand`

View File

@ -25,7 +25,7 @@ def mkCheck(scalaBinV: String, sbtBinVer: String, sbtVerPrefix: String) = Def.ta
scalaBinaryVersion.value == scalaBinV,
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 cr = ur.configuration(Compile).get