mirror of https://github.com/sbt/sbt.git
Autoplugin confgiurations must be injected first into project.
Fixes #1247
This commit is contained in:
parent
57adb5ff7a
commit
22b99a9a1c
|
|
@ -469,7 +469,7 @@ object Load
|
|||
val autoConfigs = autoPlugins.flatMap(_.projectConfigurations)
|
||||
val loadedSbtFiles = loadSbtFiles(project.auto, project.base, autoPlugins, project.settings)
|
||||
// add the automatically selected settings, record the selected AutoPlugins, and register the automatically selected configurations
|
||||
val transformed = project.copy(settings = loadedSbtFiles.settings).setAutoPlugins(autoPlugins).overrideConfigs(autoConfigs : _*)
|
||||
val transformed = project.copy(settings = loadedSbtFiles.settings).setAutoPlugins(autoPlugins).prefixConfigs(autoConfigs : _*)
|
||||
(transformed, loadedSbtFiles.projects)
|
||||
}
|
||||
def defaultLoad = loadSbtFiles(AddSettings.defaultSbtFiles, buildBase, Nil, Nil).projects
|
||||
|
|
|
|||
|
|
@ -109,6 +109,11 @@ sealed trait Project extends ProjectDefinition[ProjectReference]
|
|||
/** Adds configurations to this project. Added configurations replace existing configurations with the same name.*/
|
||||
def overrideConfigs(cs: Configuration*): Project = copy(configurations = Defaults.overrideConfigs(cs : _*)(configurations))
|
||||
|
||||
/** Adds configuration at the *start* of the configuration list for this rpoject. Prevous configurations replace this prefix
|
||||
* list with the same name.
|
||||
*/
|
||||
def prefixConfigs(cs: Configuration*): Project = copy(configurations = Defaults.overrideConfigs(configurations : _*)(cs))
|
||||
|
||||
/** Adds new configurations directly to this project. To override an existing configuration, use `overrideConfigs`. */
|
||||
def configs(cs: Configuration*): Project = copy(configurations = configurations ++ cs)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue