Skip to content

Commit 5de0707

Browse files
author
Hugo Costa
committed
Set apiVersion and languageVersion to 2.0 to ensure backwards compatibility
1 parent f6c98f0 commit 5de0707

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
@@ -197,6 +197,19 @@ subprojects {
197197
}
198198
}
199199

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

0 commit comments

Comments
 (0)