mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Fix previous version calculation.
This commit is contained in:
parent
0b742af5fa
commit
754b2df5fc
1 changed files with 2 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue