Skip to content

Commit e2a9113

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

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

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

okhttp/api/android/okhttp.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ public abstract interface class okhttp3/TrailersSource {
12411241
public static final field Companion Lokhttp3/TrailersSource$Companion;
12421242
public static final field EMPTY Lokhttp3/TrailersSource;
12431243
public abstract fun get ()Lokhttp3/Headers;
1244-
public fun peek ()Lokhttp3/Headers;
1244+
public abstract fun peek ()Lokhttp3/Headers;
12451245
}
12461246

12471247
public final class okhttp3/TrailersSource$Companion {

okhttp/api/jvm/okhttp.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ public abstract interface class okhttp3/TrailersSource {
12401240
public static final field Companion Lokhttp3/TrailersSource$Companion;
12411241
public static final field EMPTY Lokhttp3/TrailersSource;
12421242
public abstract fun get ()Lokhttp3/Headers;
1243-
public fun peek ()Lokhttp3/Headers;
1243+
public abstract fun peek ()Lokhttp3/Headers;
12441244
}
12451245

12461246
public final class okhttp3/TrailersSource$Companion {

0 commit comments

Comments
 (0)