Kill project delegation

This commit is contained in:
Dale Wijnand 2017-04-05 13:44:28 +01:00
parent 1f02e61819
commit a0eeec37e2
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
3 changed files with 5 additions and 10 deletions

View File

@ -49,15 +49,12 @@ sealed trait ProjectDefinition[PR <: ProjectReference] {
*/
def aggregate: Seq[PR]
@deprecated("Delegation between projects should be replaced by directly sharing settings.", "0.13.0")
def delegates: Seq[PR]
/** The references to projects that are classpath dependencies of this project. */
def dependencies: Seq[ClasspathDep[PR]]
/** The references to projects that are aggregate and classpath dependencies of this project. */
def uses: Seq[PR] = aggregate ++ dependencies.map(_.project)
def referenced: Seq[PR] = delegates ++ uses
def referenced: Seq[PR] = uses
/**
* The defined [[Plugins]] associated with this project.
@ -169,9 +166,6 @@ sealed trait Project extends ProjectDefinition[ProjectReference] {
Eval.later { deps } map { ds1 => ds0 ++ ds1 }
})
// @deprecated("Delegation between projects should be replaced by directly sharing settings.", "0.13.0")
// def delegateTo(from: ProjectReference*): Project = copy(delegates = delegates ++ from)
/**
* Adds projects to be aggregated. When a user requests a task to run on this project from the command line,
* the task will also be run in aggregated projects.

View File

@ -68,7 +68,6 @@ object BuildUtil {
// check for cycles
for ((_, lbu) <- units; proj <- lbu.defined.values) {
deps(proj)(_.dependencies.map(_.project))
deps(proj)(_.delegates)
deps(proj)(_.aggregate)
}
}

View File

@ -149,8 +149,10 @@ private[sbt] object Load {
def configInheritRef(lb: LoadedBuild, ref: ProjectRef, config: ConfigKey): Seq[ConfigKey] =
configurationOpt(lb.units, ref.build, ref.project, config).toList.flatMap(_.extendsConfigs).map(c => ConfigKey(c.name))
def projectInherit(lb: LoadedBuild, ref: ProjectRef): Seq[ProjectRef] =
getProject(lb.units, ref.build, ref.project).delegates
def projectInherit(lb: LoadedBuild, ref: ProjectRef): Seq[ProjectRef] = {
val _ = getProject(lb.units, ref.build, ref.project)
Nil
}
// build, load, and evaluate all units.
// 1) Compile all plugin definitions