diff --git a/compiler/tests-different-jdk/build.gradle.kts b/compiler/tests-different-jdk/build.gradle.kts index 17eb5397315..d98e1f16800 100644 --- a/compiler/tests-different-jdk/build.gradle.kts +++ b/compiler/tests-different-jdk/build.gradle.kts @@ -53,12 +53,14 @@ fun Project.codegenTest( codegenTest(target = 6, jvm = 6, jdk = "JDK_18") { dependsOn(testJvm6ServerRuntime) - systemProperty("kotlin.test.default.jvm.target", "1.6") - systemProperty("kotlin.test.java.compilation.target", "1.6") + doFirst { + systemProperty("kotlin.test.default.jvm.target", "1.6") + systemProperty("kotlin.test.java.compilation.target", "1.6") - val port = project.findProperty("kotlin.compiler.codegen.tests.port") ?: "5100" - systemProperty("kotlin.test.box.in.separate.process.port", port) - systemProperty("kotlin.test.box.in.separate.process.server.classpath", testJvm6ServerRuntime.asPath) + val port = project.findProperty("kotlin.compiler.codegen.tests.port") ?: "5100" + systemProperty("kotlin.test.box.in.separate.process.port", port) + systemProperty("kotlin.test.box.in.separate.process.server.classpath", testJvm6ServerRuntime.asPath) + } } codegenTest(target = 6, jvm = 9) {}