mirror of https://github.com/sbt/sbt.git
move dependency mapping to IvySbt#Module
This commit is contained in:
parent
179a2a31c8
commit
aebde6b3e6
|
|
@ -108,6 +108,11 @@ final class IvySbt(val configuration: IvyConfiguration)
|
|||
withIvy[T](log) { ivy => f(ivy, moduleDescriptor0, defaultConfig0) }
|
||||
|
||||
def moduleDescriptor(log: Logger): DefaultModuleDescriptor = withModule(log)((_,md,_) => md)
|
||||
def dependencyMapping(log: Logger): (ModuleRevisionId, ModuleDescriptor) =
|
||||
{
|
||||
val md = moduleDescriptor(log)
|
||||
(md.getModuleRevisionId, md)
|
||||
}
|
||||
def defaultConfig(log: Logger): String = withModule(log)( (_,_,dc) => dc)
|
||||
// these should only be referenced by withModule because lazy vals synchronize on this object
|
||||
// withIvy explicitly locks the IvySbt object, so they have to be done in the right order to avoid deadlock
|
||||
|
|
|
|||
|
|
@ -747,10 +747,7 @@ object Classpaths
|
|||
|
||||
def depMap(projects: Seq[(ProjectRef,ResolvedProject)], data: Settings[Scope], log: Logger): Task[Map[ModuleRevisionId, ModuleDescriptor]] =
|
||||
projects.flatMap { case (p,_) => ivyModule in p get data }.join.map { mods =>
|
||||
(mods.map{ mod =>
|
||||
val md = mod.moduleDescriptor(log)
|
||||
(md.getModuleRevisionId, md)
|
||||
}).toMap
|
||||
mods map { _.dependencyMapping(log) } toMap ;
|
||||
}
|
||||
|
||||
def projectResolverTask: Initialize[Task[Resolver]] =
|
||||
|
|
|
|||
Loading…
Reference in New Issue