[Gradle, K/N] Move compiler version change to separate test

This commit is contained in:
Alexander.Likhachev
2020-10-13 22:41:36 +03:00
parent f0aa4a59e3
commit 7c2339bcad
5 changed files with 47 additions and 16 deletions
@@ -686,11 +686,28 @@ class GeneralNativeIT : BaseGradleIT() {
assertSuccessful()
assertTasksUpToDate(hostLibraryTasks)
}
}
}
build(*hostLibraryTasks.toTypedArray(), "-Porg.jetbrains.kotlin.native.version=1.3.70-dev-13258") {
assertSuccessful()
assertTasksExecuted(hostLibraryTasks)
}
@Test
fun testCompilerVersionChange() = with(transformNativeTestProjectWithPluginDsl("native-compiler-version")) {
val compileTasks = listOf(":compileKotlinHost")
val compileTasksArray = compileTasks.toTypedArray()
build(*compileTasksArray) {
assertSuccessful()
assertTasksExecuted(compileTasks)
}
build(*compileTasksArray) {
assertSuccessful()
assertTasksUpToDate(compileTasks)
}
// Check that changing K/N version lead to tasks rerun
build(*compileTasksArray, "-Porg.jetbrains.kotlin.native.version=1.4.20-dev-16314") {
assertSuccessful()
assertTasksExecuted(compileTasks)
}
}
@@ -0,0 +1,12 @@
plugins {
id("org.jetbrains.kotlin.multiplatform").version("<pluginMarkerVersion>")
}
repositories {
mavenLocal()
jcenter()
}
kotlin {
<SingleNativeTarget>("host")
}
@@ -0,0 +1,11 @@
pluginManagement {
repositories {
mavenLocal()
jcenter()
gradlePluginPortal()
}
}
enableFeaturePreview('GRADLE_METADATA')
rootProject.name = "native-endorsed"
@@ -1,12 +0,0 @@
import kotlinx.cli.*
fun main(args: Array<String>) {
val argParser = ArgParser("test")
val mode by argParser.option(
ArgType.Choice(listOf("video", "audio", "both")), shortName = "m", description = "Play mode")
.default("both")
val size by argParser.option(ArgType.Int, shortName = "s", description = "Required size of videoplayer window")
.delimiter(",")
val fileName by argParser.argument(ArgType.String, description = "File to play")
argParser.parse(args)
}