mirror of https://github.com/sbt/sbt.git
inter-project provided dependencies, closes #53
This commit is contained in:
parent
540f7df9e1
commit
62c580024d
|
|
@ -736,7 +736,7 @@ object Classpaths
|
||||||
}
|
}
|
||||||
|
|
||||||
def internalDependencies: Initialize[Task[Classpath]] =
|
def internalDependencies: Initialize[Task[Classpath]] =
|
||||||
(thisProjectRef, thisProject, configuration, settings) flatMap internalDependencies0
|
(thisProjectRef, thisProject, classpathConfiguration, configuration, settings) flatMap internalDependencies0
|
||||||
def unmanagedDependencies: Initialize[Task[Classpath]] =
|
def unmanagedDependencies: Initialize[Task[Classpath]] =
|
||||||
(thisProjectRef, thisProject, configuration, settings) flatMap unmanagedDependencies0
|
(thisProjectRef, thisProject, configuration, settings) flatMap unmanagedDependencies0
|
||||||
def mkIvyConfiguration: Initialize[Task[IvyConfiguration]] =
|
def mkIvyConfiguration: Initialize[Task[IvyConfiguration]] =
|
||||||
|
|
@ -773,16 +773,16 @@ object Classpaths
|
||||||
visited.toSeq
|
visited.toSeq
|
||||||
}
|
}
|
||||||
def unmanagedDependencies0(projectRef: ProjectRef, project: ResolvedProject, conf: Configuration, data: Settings[Scope]): Task[Classpath] =
|
def unmanagedDependencies0(projectRef: ProjectRef, project: ResolvedProject, conf: Configuration, data: Settings[Scope]): Task[Classpath] =
|
||||||
interDependencies(projectRef, project, conf, data, true, unmanagedLibs)
|
interDependencies(projectRef, project, conf, conf, data, true, unmanagedLibs)
|
||||||
def internalDependencies0(projectRef: ProjectRef, project: ResolvedProject, conf: Configuration, data: Settings[Scope]): Task[Classpath] =
|
def internalDependencies0(projectRef: ProjectRef, project: ResolvedProject, conf: Configuration, self: Configuration, data: Settings[Scope]): Task[Classpath] =
|
||||||
interDependencies(projectRef, project, conf, data, false, productsTask)
|
interDependencies(projectRef, project, conf, self, data, false, productsTask)
|
||||||
def interDependencies(projectRef: ProjectRef, project: ResolvedProject, conf: Configuration, data: Settings[Scope], includeSelf: Boolean,
|
def interDependencies(projectRef: ProjectRef, project: ResolvedProject, conf: Configuration, self: Configuration, data: Settings[Scope], includeSelf: Boolean,
|
||||||
f: (ProjectRef, String, Settings[Scope]) => Task[Classpath]): Task[Classpath] =
|
f: (ProjectRef, String, Settings[Scope]) => Task[Classpath]): Task[Classpath] =
|
||||||
{
|
{
|
||||||
val visited = interSort(projectRef, project, conf, data)
|
val visited = interSort(projectRef, project, conf, data)
|
||||||
val tasks = asScalaSet(new LinkedHashSet[Task[Classpath]])
|
val tasks = asScalaSet(new LinkedHashSet[Task[Classpath]])
|
||||||
for( (dep, c) <- visited )
|
for( (dep, c) <- visited )
|
||||||
if(includeSelf || (dep != projectRef) || conf.name != c )
|
if(includeSelf || (dep != projectRef) || (conf.name != c && self.name != c))
|
||||||
tasks += f(dep, c, data)
|
tasks += f(dep, c, data)
|
||||||
|
|
||||||
(tasks.toSeq.join).map(_.flatten.distinct)
|
(tasks.toSeq.join).map(_.flatten.distinct)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue