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

Fix previous version calculation.

This commit is contained in:
Cedric Beust 2017-03-03 09:30:19 -08:00
parent 0b742af5fa
commit 754b2df5fc

View file

@ -38,7 +38,8 @@ class KFiles {
// When Kobalt can't find the newest jar file, it will instead use the classes produced by IDEA // When Kobalt can't find the newest jar file, it will instead use the classes produced by IDEA
// in the directories specified here: // in the directories specified here:
val leftSuffix = Kobalt.version.substring(0, Kobalt.version.lastIndexOf(".") + 1) val leftSuffix = Kobalt.version.substring(0, Kobalt.version.lastIndexOf(".") + 1)
val previousVersion = leftSuffix + (Kobalt.version.split(".")[1].toInt() - 1).toString() val previousVersion = leftSuffix +
(Kobalt.version.split(".").let { it[it.size - 1] }.toInt() - 1).toString()
val previousJar = joinDir(distributionsDir, "kobalt-" + previousVersion, val previousJar = joinDir(distributionsDir, "kobalt-" + previousVersion,
"kobalt/wrapper/kobalt-$previousVersion.jar") "kobalt/wrapper/kobalt-$previousVersion.jar")
val result = listOf("", "modules/kobalt-plugin-api", "modules/wrapper").map { val result = listOf("", "modules/kobalt-plugin-api", "modules/wrapper").map {