1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -07:00
This commit is contained in:
Cedric Beust 2015-12-16 18:52:42 +04:00
parent 6c36a7c227
commit 55bc15359a

View file

@ -12,7 +12,7 @@ import java.util.concurrent.ExecutorService
import javax.inject.Inject import javax.inject.Inject
public class DepFactory @Inject constructor(val localRepo: LocalRepo, public class DepFactory @Inject constructor(val localRepo: LocalRepo,
val repoFinder: RepoFinder, val remoteRepo: RepoFinder,
val executors: KobaltExecutors, val executors: KobaltExecutors,
val downloadManager: DownloadManager, val downloadManager: DownloadManager,
val pomFactory: Pom.IFactory) { val pomFactory: Pom.IFactory) {
@ -39,7 +39,7 @@ public class DepFactory @Inject constructor(val localRepo: LocalRepo,
if (localFirst) { if (localFirst) {
localRepo.findLocalVersion(mavenId.groupId, mavenId.artifactId, mavenId.packaging) localRepo.findLocalVersion(mavenId.groupId, mavenId.artifactId, mavenId.packaging)
} else { } else {
repoResult = repoFinder.findCorrectRepo(id) repoResult = remoteRepo.findCorrectRepo(id)
if (!repoResult.found) { if (!repoResult.found) {
throw KobaltException("Couldn't resolve $id") throw KobaltException("Couldn't resolve $id")
} else { } else {
@ -48,7 +48,7 @@ public class DepFactory @Inject constructor(val localRepo: LocalRepo,
} }
return MavenDependency(MavenId.create(mavenId.groupId, mavenId.artifactId, packaging, version), return MavenDependency(MavenId.create(mavenId.groupId, mavenId.artifactId, packaging, version),
executor, localRepo, repoFinder, pomFactory, downloadManager) executor, localRepo, remoteRepo, pomFactory, downloadManager)
} }
} }
} }