diff --git a/build.gradle.kts b/build.gradle.kts index 57e8e522729..af388fc6bce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -708,24 +708,24 @@ tasks { dependsOn(":kotlin-scripting-dependencies:test") dependsOn(":kotlin-scripting-dependencies-maven:test") dependsOn(":kotlin-scripting-dependencies-maven-all:test") - dependsOn(":kotlin-scripting-jsr223-test:test") // see comments on the task in kotlin-scripting-jvm-host-test // dependsOn(":kotlin-scripting-jvm-host-test:embeddableTest") - dependsOn(":kotlin-scripting-jsr223-test:embeddableTest") - dependsOn(":kotlin-scripting-ide-services-test:test") - dependsOn(":kotlin-scripting-ide-services-test:embeddableTest") dependsOn(":kotlin-main-kts-test:test") } - register("scriptingK2Test") { - dependsOn(":kotlin-scripting-compiler:testWithK2") - dependsOn(":kotlin-scripting-jvm-host-test:testWithK2") - dependsOn(":kotlin-main-kts-test:testWithK2") + register("scriptingK1JvmTest") { + dependsOn(":kotlin-scripting-compiler:testWithK1") + dependsOn(":kotlin-scripting-jvm-host-test:testWithK1") + dependsOn(":kotlin-main-kts-test:testWithK1") + dependsOn(":kotlin-scripting-jsr223-test:test") + dependsOn(":kotlin-scripting-jsr223-test:embeddableTest") + dependsOn(":kotlin-scripting-ide-services-test:test") + dependsOn(":kotlin-scripting-ide-services-test:embeddableTest") } register("scriptingTest") { dependsOn("scriptingJvmTest") - dependsOn("scriptingK2Test") + dependsOn("scriptingK1JvmTest") } register("compilerTest") { diff --git a/libraries/scripting/jsr223-test/build.gradle.kts b/libraries/scripting/jsr223-test/build.gradle.kts index 4a5f6b847e4..1d8ddfa85f9 100644 --- a/libraries/scripting/jsr223-test/build.gradle.kts +++ b/libraries/scripting/jsr223-test/build.gradle.kts @@ -53,6 +53,7 @@ projectTest(parallel = true) { doFirst { systemProperty("testJsr223RuntimeClasspath", testRuntimeProvider.get()) systemProperty("testCompilationClasspath", testCompilationClasspathProvider.get()) + systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9") } } @@ -60,4 +61,11 @@ projectTest(taskName = "embeddableTest", parallel = true) { workingDir = rootDir dependsOn(embeddableTestRuntime) classpath = embeddableTestRuntime + val testRuntimeProvider = project.provider { embeddableTestRuntime.asPath } + val testCompilationClasspathProvider = project.provider { testCompilationClasspath.asPath } + doFirst { + systemProperty("testJsr223RuntimeClasspath", testRuntimeProvider.get()) + systemProperty("testCompilationClasspath", testCompilationClasspathProvider.get()) + systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9") + } } diff --git a/libraries/scripting/jvm-host-test/build.gradle.kts b/libraries/scripting/jvm-host-test/build.gradle.kts index 7bea1e2c7e3..c4212c18841 100644 --- a/libraries/scripting/jvm-host-test/build.gradle.kts +++ b/libraries/scripting/jvm-host-test/build.gradle.kts @@ -53,8 +53,10 @@ projectTest(parallel = true) { // classpath = embeddableTestRuntime //} -projectTest(taskName = "testWithK2", parallel = true) { +projectTest(taskName = "testWithK1", parallel = true) { dependsOn(":dist") workingDir = rootDir - systemProperty("kotlin.script.base.compiler.arguments", "-language-version 2.0") + doFirst { + systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9") + } } diff --git a/libraries/tools/kotlin-main-kts-test/build.gradle.kts b/libraries/tools/kotlin-main-kts-test/build.gradle.kts index 9c3aee4961f..d8d71a0d023 100644 --- a/libraries/tools/kotlin-main-kts-test/build.gradle.kts +++ b/libraries/tools/kotlin-main-kts-test/build.gradle.kts @@ -25,18 +25,20 @@ sourceSets { projectTest(parallel = true) { dependsOn(":dist", ":kotlinx-serialization-compiler-plugin.embeddable:embeddable") + workingDir = rootDir val localKotlinxSerializationPluginClasspath: FileCollection = kotlinxSerializationGradlePluginClasspath doFirst { systemProperty("kotlin.script.test.kotlinx.serialization.plugin.classpath", localKotlinxSerializationPluginClasspath.asPath) } - workingDir = rootDir } -projectTest(taskName = "testWithK2", parallel = true) { +projectTest(taskName = "testWithK1", parallel = true) { dependsOn(":dist", ":kotlinx-serialization-compiler-plugin.embeddable:embeddable") workingDir = rootDir val localKotlinxSerializationPluginClasspath: FileCollection = kotlinxSerializationGradlePluginClasspath - systemProperty("kotlin.script.test.kotlinx.serialization.plugin.classpath", localKotlinxSerializationPluginClasspath.asPath) - systemProperty("kotlin.script.base.compiler.arguments", "-language-version 2.0") - systemProperty("kotlin.script.test.base.compiler.arguments", "-language-version 2.0") + doFirst { + systemProperty("kotlin.script.test.kotlinx.serialization.plugin.classpath", localKotlinxSerializationPluginClasspath.asPath) + systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9") + systemProperty("kotlin.script.test.base.compiler.arguments", "-language-version 1.9") + } } diff --git a/plugins/scripting/scripting-compiler/build.gradle.kts b/plugins/scripting/scripting-compiler/build.gradle.kts index 6399f16822d..7e55d337f6b 100644 --- a/plugins/scripting/scripting-compiler/build.gradle.kts +++ b/plugins/scripting/scripting-compiler/build.gradle.kts @@ -63,14 +63,18 @@ testsJar() projectTest(parallel = true) { dependsOn(":dist") workingDir = rootDir - systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator)) + doFirst { + systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator)) + } } -projectTest(taskName = "testWithK2", parallel = true) { +projectTest(taskName = "testWithK1", parallel = true) { dependsOn(":dist") workingDir = rootDir - systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator)) - systemProperty("kotlin.script.test.base.compiler.arguments", "-language-version 2.0") - systemProperty("kotlin.script.base.compiler.arguments", "-language-version 2.0") + doFirst { + systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator)) + systemProperty("kotlin.script.test.base.compiler.arguments", "-language-version 1.9") + systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9") + } } diff --git a/plugins/scripting/scripting-ide-services-test/build.gradle.kts b/plugins/scripting/scripting-ide-services-test/build.gradle.kts index 5efb85d3aaa..77f3467064c 100644 --- a/plugins/scripting/scripting-ide-services-test/build.gradle.kts +++ b/plugins/scripting/scripting-ide-services-test/build.gradle.kts @@ -59,6 +59,9 @@ tasks.withType> { projectTest(parallel = true) { dependsOn(":kotlin-compiler:distKotlinc") workingDir = rootDir + doFirst { + systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9") + } } // This doesn;t work now due to conflicts between embeddable compiler contents and intellij sdk modules @@ -69,4 +72,7 @@ projectTest(taskName = "embeddableTest", parallel = true) { classpath = embeddableTestRuntime exclude("**/JvmReplIdeTest.class") + doFirst { + systemProperty("kotlin.script.base.compiler.arguments", "-language-version 1.9") + } }