diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 661404a47..f574ee023 100644 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -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 diff --git a/main/src/main/scala/sbt/Keys.scala b/main/src/main/scala/sbt/Keys.scala index 4d1da4a18..7e8f00daa 100644 --- a/main/src/main/scala/sbt/Keys.scala +++ b/main/src/main/scala/sbt/Keys.scala @@ -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) diff --git a/main/src/main/scala/sbt/PluginCross.scala b/main/src/main/scala/sbt/PluginCross.scala index 7532eaffd..bfbd80410 100644 --- a/main/src/main/scala/sbt/PluginCross.scala +++ b/main/src/main/scala/sbt/PluginCross.scala @@ -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)))( diff --git a/main/src/main/scala/sbt/internal/CommandStrings.scala b/main/src/main/scala/sbt/internal/CommandStrings.scala index 3b72c3257..246fde577 100644 --- a/main/src/main/scala/sbt/internal/CommandStrings.scala +++ b/main/src/main/scala/sbt/internal/CommandStrings.scala @@ -407,7 +407,7 @@ $SwitchCommand [=][!] [-v] [] Runs 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 . When finished, it reloads the build with the original Scala version. @@ -418,7 +418,7 @@ $SwitchCommand [=][!] [-v] [] s"""$PluginSwitchCommand [] Changes the sbt version and runs a command. - Sets the `sbtVersion in pluginCrossBuild` of all projects to and + Sets the `pluginCrossBuild / sbtVersion` of all projects to and reloads the build. If is provided, it is then executed. See also `help $CrossCommand` diff --git a/sbt-app/src/sbt-test/project1/cross-plugins-defaults/build.sbt b/sbt-app/src/sbt-test/project1/cross-plugins-defaults/build.sbt index 8f328730b..212ba7ce5 100644 --- a/sbt-app/src/sbt-test/project1/cross-plugins-defaults/build.sbt +++ b/sbt-app/src/sbt-test/project1/cross-plugins-defaults/build.sbt @@ -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