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

Fix jitpack.io repo.

This commit is contained in:
Cedric Beust 2016-01-30 01:10:02 +04:00
parent 3f1dbca5b5
commit c5bacb6c4f

View file

@ -28,13 +28,15 @@ class ResolveDependency @Inject constructor(val repoFinder: RepoFinder, val loca
val indent = -1 val indent = -1
val originalDep = MavenDependency.create(id) val originalDep = MavenDependency.create(id)
val mavenId = MavenId.create(id)
val packaging = if (mavenId.packaging != null) "@" + mavenId.packaging else ""
// We want to display the dependencies of the id we found, not the one we queries // We want to display the dependencies of the id we found, not the one we queries
val dep = MavenDependency.create(originalDep.shortId + repoResult.version) val dep = MavenDependency.create(originalDep.shortId + repoResult.version + packaging)
val root = Node(Dep(dep, indent)) val root = Node(Dep(dep, indent))
val seen = hashSetOf(id) val seen = hashSetOf(id)
root.addChildren(findChildren(root, seen)) root.addChildren(findChildren(root, seen))
val simpleDep = SimpleDep(MavenId.create(id)) val simpleDep = SimpleDep(mavenId)
val url = repoResult.hostConfig.url + simpleDep.toJarFile(repoResult) val url = repoResult.hostConfig.url + simpleDep.toJarFile(repoResult)
val localFile = localRepo.toFullPath(simpleDep.toJarFile(repoResult)) val localFile = localRepo.toFullPath(simpleDep.toJarFile(repoResult))
AsciiArt.logBox(listOf(id, url, localFile).map { " $it" }, {s -> println(s) }) AsciiArt.logBox(listOf(id, url, localFile).map { " $it" }, {s -> println(s) })