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

Make --resolve accept only one id.

Necessary for version ranges, which are defined with a comma.
This commit is contained in:
Cedric Beust 2016-08-02 21:37:02 -08:00
parent 6121ec0ac3
commit efca7320bb
3 changed files with 12 additions and 7 deletions

View file

@ -72,8 +72,8 @@ class Args {
var profiling: Boolean = false
@Parameter(names = arrayOf("--resolve"),
description = "Resolve the given comma-separated dependencies and display their dependency tree")
var dependencies: String? = null
description = "Resolve the given dependency and display its tree")
var dependency: String? = null
@Parameter(names = arrayOf("--projectInfo"), description = "Display information about the current projects")
var projectInfo: Boolean = false

View file

@ -25,7 +25,7 @@ class ResolveDependency @Inject constructor(
class Dep(val dep: IClasspathDependency, val level: Int)
fun run(ids: List<String>) = ids.forEach { displayDependenciesFor(it) }
fun run(id: String) = displayDependenciesFor(id)
private fun displayDependenciesFor(id: String) {
val mavenId = MavenId.create(id)