Extract common versions to the separate file.
^KT-45744 In Progress
This commit is contained in:
committed by
TeamCityServer
parent
8db67ec24b
commit
aabb05104e
+2
-1
@@ -23,6 +23,7 @@ import org.jetbrains.kotlin.gradle.plugin.MULTIPLE_KOTLIN_PLUGINS_LOADED_WARNING
|
||||
import org.jetbrains.kotlin.gradle.plugin.MULTIPLE_KOTLIN_PLUGINS_SPECIFIC_PROJECTS_WARNING
|
||||
import org.jetbrains.kotlin.gradle.scripting.internal.ScriptingGradleSubplugin
|
||||
import org.jetbrains.kotlin.gradle.tasks.USING_JVM_INCREMENTAL_COMPILATION_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.testbase.TestVersions
|
||||
import org.jetbrains.kotlin.gradle.util.*
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil
|
||||
import org.junit.Test
|
||||
@@ -402,7 +403,7 @@ class KotlinGradleIT : BaseGradleIT() {
|
||||
assertSuccessful()
|
||||
}
|
||||
|
||||
project.build("clean", "assemble", options = options.copy(kotlinVersion = "1.3.41")) {
|
||||
project.build("clean", "assemble", options = options.copy(kotlinVersion = TestVersions.Kotlin.STABLE_RELEASE)) {
|
||||
assertSuccessful()
|
||||
}
|
||||
}
|
||||
|
||||
+3
-9
@@ -10,18 +10,12 @@ import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.gradle.internal.impldep.org.junit.platform.commons.support.AnnotationSupport.findAnnotation
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.BaseGradleIT
|
||||
import org.jetbrains.kotlin.gradle.KOTLIN_VERSION
|
||||
import org.jetbrains.kotlin.gradle.utils.minSupportedGradleVersion
|
||||
import org.jetbrains.kotlin.test.WithMuteInDatabase
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.extension.ExtensionContext
|
||||
import org.junit.jupiter.api.io.TempDir
|
||||
import org.junit.jupiter.params.ParameterizedTest
|
||||
import org.junit.jupiter.params.provider.Arguments
|
||||
import org.junit.jupiter.params.provider.ArgumentsProvider
|
||||
import org.junit.jupiter.params.provider.ArgumentsSource
|
||||
import java.nio.file.Path
|
||||
import java.util.stream.Stream
|
||||
import kotlin.streams.asStream
|
||||
@@ -39,7 +33,7 @@ abstract class KGPBaseTest {
|
||||
|
||||
data class BuildOptions(
|
||||
val logLevel: LogLevel = LogLevel.INFO,
|
||||
val kotlinVersion: String = KOTLIN_VERSION,
|
||||
val kotlinVersion: String = TestVersions.Kotlin.CURRENT,
|
||||
val warningMode: WarningMode = WarningMode.Fail,
|
||||
val configurationCache: Boolean = false,
|
||||
val configurationCacheProblems: BaseGradleIT.ConfigurationCacheProblems = BaseGradleIT.ConfigurationCacheProblems.FAIL,
|
||||
@@ -117,8 +111,8 @@ abstract class KGPBaseTest {
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.ANNOTATION_CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class GradleTestVersions(
|
||||
val minVersion: String = minSupportedGradleVersion,
|
||||
val maxVersion: String = "7.0",
|
||||
val minVersion: String = TestVersions.Gradle.MIN_SUPPORTED,
|
||||
val maxVersion: String = TestVersions.Gradle.MAX_SUPPORTED,
|
||||
val additionalVersions: Array<String> = []
|
||||
)
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.gradle.testbase
|
||||
|
||||
import org.jetbrains.kotlin.gradle.utils.minSupportedGradleVersion
|
||||
|
||||
interface TestVersions {
|
||||
object Gradle {
|
||||
const val MIN_SUPPORTED = minSupportedGradleVersion
|
||||
const val MAX_SUPPORTED = "7.0"
|
||||
}
|
||||
|
||||
object Kotlin {
|
||||
const val STABLE_RELEASE = "1.4.32"
|
||||
|
||||
// Copied from KOTLIN_VERSION.kt file
|
||||
val CURRENT
|
||||
get() = System.getProperty("kotlinVersion") ?: error("Required to specify kotlinVersion system property for tests")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user