'Configure kotlin' should set 1.2-SNAPSHOT version in build.gradle for snapshot version of kotlin plugin

This commit is contained in:
Natalia Selezneva
2018-02-27 11:10:30 +03:00
parent cdcb651c8e
commit 2486be0f86
3 changed files with 4 additions and 2 deletions
@@ -69,7 +69,7 @@ abstract class GradleKotlinFrameworkSupportProvider(
var kotlinVersion = bundledRuntimeVersion()
val additionalRepository = getRepositoryForVersion(kotlinVersion)
if (isSnapshot(bundledRuntimeVersion())) {
kotlinVersion = "1.1-SNAPSHOT"
kotlinVersion = LAST_SNAPSHOT_VERSION
}
if (additionalRepository != null) {
@@ -52,7 +52,7 @@ abstract class KotlinDslGradleKotlinFrameworkSupportProvider(
var kotlinVersion = bundledRuntimeVersion()
val additionalRepository = getRepositoryForVersion(kotlinVersion)
if (isSnapshot(bundledRuntimeVersion())) {
kotlinVersion = "1.1-SNAPSHOT"
kotlinVersion = LAST_SNAPSHOT_VERSION
}
if (additionalRepository != null) {
@@ -43,6 +43,8 @@ import org.jetbrains.kotlin.utils.ifEmpty
data class RepositoryDescription(val id: String, val name: String, val url: String, val bintrayUrl: String?, val isSnapshot: Boolean)
const val LAST_SNAPSHOT_VERSION = "1.2-SNAPSHOT"
val SNAPSHOT_REPOSITORY = RepositoryDescription(
"sonatype.oss.snapshots",
"Sonatype OSS Snapshot Repository",