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

New id syntax.

This commit is contained in:
Cedric Beust 2015-12-16 08:06:48 +04:00
parent 3322d27157
commit b2a187d4d8

View file

@ -74,9 +74,8 @@ class MavenId private constructor(val groupId: String, val artifactId: String, v
create(toId(groupId, artifactId, packaging, version))
fun toId(groupId: String, artifactId: String, packaging: String? = null, version: String?) =
"$groupId:$artifactId" +
(if (packaging != null) ":$packaging" else "") +
":$version"
"$groupId:$artifactId:$version" +
(if (packaging != null) "@$packaging" else "")
}