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

Fix the empty dependency bugs.

This code used to work pre-RC but the RC seems to scope closure fields differently so that fields were being assigned to themselves.
This commit is contained in:
Cedric Beust 2016-02-06 01:05:07 +04:00
parent 15ca9dc27d
commit 74e65a1ef5

View file

@ -63,11 +63,11 @@ public class MavenDependency @Inject constructor(mavenId: MavenId,
override val id = mavenId.toId
override fun toMavenDependencies(): Dependency {
return Dependency().apply {
setGroupId(groupId)
setArtifactId(artifactId)
setVersion(version)
override fun toMavenDependencies() = let { md ->
Dependency().apply {
groupId = md.groupId
artifactId = md.artifactId
version = md.version
}
}