1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -07:00

Refactor.

This commit is contained in:
Cedric Beust 2016-02-08 23:21:13 +04:00
parent af68ef882e
commit a95c227554

View file

@ -25,10 +25,8 @@ import javax.xml.xpath.XPathFactory
* Find the repo that contains the given dependency among a list of repos. Searches are performed in parallel and * Find the repo that contains the given dependency among a list of repos. Searches are performed in parallel and
* cached so we never make a network call for the same dependency more than once. * cached so we never make a network call for the same dependency more than once.
*/ */
public class RepoFinder @Inject constructor(val executors: KobaltExecutors) { class RepoFinder @Inject constructor(val executors: KobaltExecutors) {
public fun findCorrectRepo(id: String): RepoResult { fun findCorrectRepo(id: String) = FOUND_REPOS.get(id)
return FOUND_REPOS.get(id)
}
data class RepoResult(val hostConfig: HostConfig, val found: Boolean, val version: Version? = null, data class RepoResult(val hostConfig: HostConfig, val found: Boolean, val version: Version? = null,
val hasJar: Boolean = true, val snapshotVersion: Version? = null) val hasJar: Boolean = true, val snapshotVersion: Version? = null)