Add dependencyOverrides for scripted-plugin

Fixes #4249

This introduces an override rule into the metabuild so scripted-plugin will align with the sbt version.
This commit is contained in:
Eugene Yokota 2018-07-10 02:03:36 -04:00
parent d7dc4b3e29
commit b3342118f8
6 changed files with 16 additions and 3 deletions

View File

@ -348,7 +348,6 @@ lazy val scriptedSbtOldProj = (project in file("scripted-sbt-old"))
)
lazy val scriptedPluginProj = (project in file("scripted-plugin"))
.dependsOn(mainProj)
.settings(
baseSettings,
name := "Scripted Plugin",
@ -358,7 +357,6 @@ lazy val scriptedPluginProj = (project in file("scripted-plugin"))
exclude[MissingClassProblem]("sbt.ScriptedPlugin*")
),
)
.configure(addSbtCompilerClasspath)
// Implementation and support code for defining actions.
lazy val actionsProj = (project in file("main-actions"))
@ -538,7 +536,8 @@ lazy val mainSettingsProj = (project in file("main-settings"))
// The main integration project for sbt. It brings all of the projects together, configures them, and provides for overriding conventions.
lazy val mainProj = (project in file("main"))
.enablePlugins(ContrabandPlugin)
.dependsOn(logicProj, actionsProj, mainSettingsProj, runProj, commandProj, collectionProj, scriptedSbtReduxProj)
.dependsOn(logicProj, actionsProj, mainSettingsProj, runProj, commandProj, collectionProj,
scriptedSbtReduxProj, scriptedPluginProj)
.settings(
testedBaseSettings,
name := "Main",

View File

@ -2190,6 +2190,16 @@ object Classpaths {
val isDotty = ScalaInstance.isDotty(version)
ScalaArtifacts.toolDependencies(sbtOrg, version, isDotty) ++ pluginAdjust
}
},
dependencyOverrides ++= {
val old = dependencyOverrides.value
val isPlugin = sbtPlugin.value
val app = appConfiguration.value
val id = app.provider.id
val sv = (sbtVersion in pluginCrossBuild).value
val base = ModuleID(id.groupID, "scripted-plugin", sv).withCrossVersion(CrossVersion.binary)
if (isPlugin) Seq(base)
else Seq()
}
)

View File

@ -0,0 +1 @@
enablePlugins(ScriptedPlugin)

View File

@ -0,0 +1 @@
addSbtPlugin("org.foundweekends.giter8" %% "sbt-giter8" % "0.11.0-M4")

View File

@ -0,0 +1 @@
> about

View File

@ -218,6 +218,7 @@ final class ScriptedTests(
case "project/extra" => LauncherBased // tbd
case "project/flatten" => LauncherBased // sbt/Package$
case "project/generated-root-no-publish" => LauncherBased // tbd
case "project/giter8-plugin" => LauncherBased // tbd
case "project/lib" => LauncherBased // sbt/Package$
case "project/scripted-plugin" => LauncherBased // tbd
case "project/scripted-skip-incompatible" => LauncherBased // sbt/Package$