mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Better version range resolution.
This commit is contained in:
parent
f0eb6c73e7
commit
981e3fb5ac
1 changed files with 2 additions and 1 deletions
|
@ -209,8 +209,9 @@ class Aether(localRepo: File, val settings: KobaltSettings, val eventBus: EventB
|
||||||
if (KobaltAether.isRangeVersion(artifact.version)) {
|
if (KobaltAether.isRangeVersion(artifact.version)) {
|
||||||
val request = rangeRequest(artifact)
|
val request = rangeRequest(artifact)
|
||||||
val v = system.resolveVersionRange(session, request)
|
val v = system.resolveVersionRange(session, request)
|
||||||
|
val highestVersion = v.versions.last { ! it.toString().contains("-")}.toString()
|
||||||
val ar = DefaultArtifact(artifact.groupId, artifact.artifactId, artifact.classifier,
|
val ar = DefaultArtifact(artifact.groupId, artifact.artifactId, artifact.classifier,
|
||||||
artifact.extension, v.highestVersion.toString())
|
artifact.extension, highestVersion)
|
||||||
listOf(AetherResult(ar, request.repositories[0]))
|
listOf(AetherResult(ar, request.repositories[0]))
|
||||||
} else {
|
} else {
|
||||||
val dependencyRequest = DependencyRequest(collectRequest(artifact, artifactScope), scopeFilter)
|
val dependencyRequest = DependencyRequest(collectRequest(artifact, artifactScope), scopeFilter)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue