Skip to content

Commit f555f22

Browse files
committed
For Train: Set API and language version for ktor-test-server
1 parent 1af6589 commit f555f22

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ktor-test-server/build.gradle.kts

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
2+
13
/*
24
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
35
*/
@@ -36,6 +38,18 @@ kotlin {
3638
jvmToolchain(21)
3739

3840
compilerOptions {
41+
languageVersion = rootProject.findProperty("kotlin_language_version")
42+
?.let { KotlinVersion.fromVersion(it.toString()) }
43+
?: KotlinVersion.KOTLIN_2_1
44+
45+
println("Using languageVersion :ktor-test-server: ${languageVersion.get()}")
46+
47+
apiVersion = rootProject.findProperty("kotlin_api_version")
48+
?.let { KotlinVersion.fromVersion(it.toString()) }
49+
?: KotlinVersion.KOTLIN_2_1
50+
51+
println("Using apiVersion :ktor-test-server: ${apiVersion.get()}")
52+
3953
allWarningsAsErrors = true
4054
// A workaround for a compiler issue KT-74984
4155
// TODO: Remove after the issue is fixed

0 commit comments

Comments
 (0)