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

Simplify.

This commit is contained in:
Cedric Beust 2016-04-09 06:11:36 -07:00
parent 6f83fecb72
commit f57ad07aca

View file

@ -35,17 +35,10 @@ class DependencyResult(val dependency: IClasspathDependency, val repoUrl: String
class KobaltAether @Inject constructor (val settings: KobaltSettings, val aether: Aether) { class KobaltAether @Inject constructor (val settings: KobaltSettings, val aether: Aether) {
val localRepo: File get() = settings.localRepo val localRepo: File get() = settings.localRepo
class MaybeArtifact(val result: DependencyResult?, val error: String?)
/** /**
* Create an IClasspathDependency from a Kobalt id. * Create an IClasspathDependency from a Kobalt id.
*/ */
fun create(id: String): IClasspathDependency { fun create(id: String) = AetherDependency(DefaultArtifact(id))
return AetherDependency(DefaultArtifact(id))
// val cr = aether.directDependencies(DefaultArtifact(MavenId.toKobaltId(id)))
// return if (cr != null) AetherDependency(cr.root.artifact)
// else throw KobaltException("Couldn't resolve $id")
}
/** /**
* @return the latest artifact for the given group and artifactId. * @return the latest artifact for the given group and artifactId.