Return milestone property back to support older versions of plugins
Older gradle plugin's NativeCompilerDownloader uses milestone property.
This commit is contained in:
@@ -12,6 +12,7 @@ interface CompilerVersion : Serializable {
|
|||||||
val major: Int
|
val major: Int
|
||||||
val minor: Int
|
val minor: Int
|
||||||
val maintenance: Int
|
val maintenance: Int
|
||||||
|
val milestone: Int
|
||||||
val build: Int
|
val build: Int
|
||||||
|
|
||||||
fun toString(showMeta: Boolean, showBuild: Boolean): String
|
fun toString(showMeta: Boolean, showBuild: Boolean): String
|
||||||
@@ -30,6 +31,7 @@ interface CompilerVersion : Serializable {
|
|||||||
major.toInt(),
|
major.toInt(),
|
||||||
minor.toInt(),
|
minor.toInt(),
|
||||||
maintenance.toIntOrNull() ?: 0,
|
maintenance.toIntOrNull() ?: 0,
|
||||||
|
-1,
|
||||||
build.toIntOrNull() ?: -1
|
build.toIntOrNull() ?: -1
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -43,6 +45,7 @@ data class CompilerVersionImpl(
|
|||||||
override val major: Int,
|
override val major: Int,
|
||||||
override val minor: Int,
|
override val minor: Int,
|
||||||
override val maintenance: Int,
|
override val maintenance: Int,
|
||||||
|
override val milestone: Int = -1,
|
||||||
override val build: Int = -1
|
override val build: Int = -1
|
||||||
) : CompilerVersion {
|
) : CompilerVersion {
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ open class VersionGenerator: DefaultTask() {
|
|||||||
val minor = matcher.group(2).toInt()
|
val minor = matcher.group(2).toInt()
|
||||||
val maintenanceStr = matcher.group(3)
|
val maintenanceStr = matcher.group(3)
|
||||||
val maintenance = maintenanceStr?.toInt() ?: 0
|
val maintenance = maintenanceStr?.toInt() ?: 0
|
||||||
|
val milestone = -1
|
||||||
project.logger.info("BUILD_NUMBER: $buildNumber")
|
project.logger.info("BUILD_NUMBER: $buildNumber")
|
||||||
var build = -1
|
var build = -1
|
||||||
if (buildNumber != null) {
|
if (buildNumber != null) {
|
||||||
@@ -101,7 +102,7 @@ open class VersionGenerator: DefaultTask() {
|
|||||||
build = buildNumberSplit[buildNumberSplit.size - 1].toInt() // //7-dev-buildcount
|
build = buildNumberSplit[buildNumberSplit.size - 1].toInt() // //7-dev-buildcount
|
||||||
}
|
}
|
||||||
|
|
||||||
val versionObject = CompilerVersionImpl(meta, major, minor, maintenance, build)
|
val versionObject = CompilerVersionImpl(meta, major, minor, maintenance, milestone, build)
|
||||||
versionObject.serialize()
|
versionObject.serialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +115,7 @@ open class VersionGenerator: DefaultTask() {
|
|||||||
"""|package org.jetbrains.kotlin.konan
|
"""|package org.jetbrains.kotlin.konan
|
||||||
|internal val currentCompilerVersion: CompilerVersion =
|
|internal val currentCompilerVersion: CompilerVersion =
|
||||||
|CompilerVersionImpl($meta, $major, $minor,
|
|CompilerVersionImpl($meta, $major, $minor,
|
||||||
| $maintenance, $build)
|
| $maintenance, $milestone, $build)
|
||||||
|val CompilerVersion.Companion.CURRENT: CompilerVersion
|
|val CompilerVersion.Companion.CURRENT: CompilerVersion
|
||||||
|get() = currentCompilerVersion""".trimMargin()
|
|get() = currentCompilerVersion""".trimMargin()
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user