From 76a1091820ad9e68bc76ac15df008efd7403003d Mon Sep 17 00:00:00 2001 From: mvicsokolova Date: Tue, 22 Aug 2023 13:32:38 +0000 Subject: [PATCH] [K/N]: Do not require JDK11 for :native:native.tests This commit provides a small fix in the code of a native test runner so that JDK11 is not required and removes the JDK11 target for the atomicfu-compiler-plugin. Fixes KT-61293 Merge-request: KT-MR-11757 Merged-by: Maria Sokolova --- native/native.tests/build.gradle.kts | 2 -- .../support/runner/AbstractLocalProcessRunner.kt | 4 ++-- plugins/atomicfu/atomicfu-compiler/build.gradle.kts | 5 ----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/native/native.tests/build.gradle.kts b/native/native.tests/build.gradle.kts index 74a2f287d1b..36b677c0dbd 100644 --- a/native/native.tests/build.gradle.kts +++ b/native/native.tests/build.gradle.kts @@ -3,8 +3,6 @@ plugins { id("jps-compatible") } -project.configureJvmToolchain(JdkMajorVersion.JDK_11_0) - dependencies { testImplementation(kotlinStdlib()) testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false } diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/runner/AbstractLocalProcessRunner.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/runner/AbstractLocalProcessRunner.kt index 592b7a848aa..fc14bcc8d61 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/runner/AbstractLocalProcessRunner.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/runner/AbstractLocalProcessRunner.kt @@ -154,8 +154,8 @@ private class UnfilteredProcessOutput { private val stdErr = ByteArrayOutputStream() fun toProcessOutput(outputFilter: TestOutputFilter): ProcessOutput = ProcessOutput( - stdOut = outputFilter.filter(stdOut.toString(Charsets.UTF_8)), - stdErr = stdErr.toString(Charsets.UTF_8) + stdOut = outputFilter.filter(stdOut.toString(Charsets.UTF_8.name())), + stdErr = stdErr.toString(Charsets.UTF_8.name()) ) companion object { diff --git a/plugins/atomicfu/atomicfu-compiler/build.gradle.kts b/plugins/atomicfu/atomicfu-compiler/build.gradle.kts index b0311eff0f5..05d833d4396 100644 --- a/plugins/atomicfu/atomicfu-compiler/build.gradle.kts +++ b/plugins/atomicfu/atomicfu-compiler/build.gradle.kts @@ -12,8 +12,6 @@ plugins { id("jps-compatible") } -project.configureJvmToolchain(JdkMajorVersion.JDK_11_0) - // WARNING: Native target is host-dependent. Re-running the same build on another host OS may bring to a different result. val nativeTargetName = HostManager.host.name @@ -59,9 +57,6 @@ repositories { } dependencies { - if (!kotlinBuildProperties.isInIdeaSync) { - testImplementation(project(mapOf("path" to ":native:native.tests"))) - } compileOnly(intellijCore()) compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all"))