Skip to content

Commit 7581937

Browse files
author
Hugo Costa
committed
Set apiVersion and languageVersion to 2.0 to ensure backwards compatibility
1 parent f06e0e9 commit 7581937

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,19 @@ subprojects {
195195
}
196196
}
197197

198+
// Configure all projects' source sets (jvm and kmp)
199+
plugins.matching { it.javaClass.name.startsWith("org.jetbrains.kotlin") }.configureEach {
200+
kotlinExtension.sourceSets {
201+
// Exclude all test source sets (containing Test)
202+
matching { !it.name.contains("Test", ignoreCase = true) }.all {
203+
languageSettings {
204+
apiVersion = "2.0"
205+
languageVersion = "2.0"
206+
}
207+
}
208+
}
209+
}
210+
198211
val platform = System.getProperty("okhttp.platform", "jdk9")
199212
val testJavaVersion = System.getProperty("test.java.version", "21").toInt()
200213

0 commit comments

Comments
 (0)