move dependency mapping to IvySbt#Module

This commit is contained in:
Mark Harrah 2011-07-06 07:30:47 -04:00
parent f2c5c62f1d
commit 3c37eaa161
1 changed files with 5 additions and 0 deletions

View File

@ -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