mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Refactor.
This commit is contained in:
parent
af68ef882e
commit
a95c227554
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue