Skip to content

Commit 7b2e01c

Browse files
authored
Bump okhttp to 5.1.0 (#440)
Bump okhttp to 5.1.0 and re-order dependency declarations so that the Kotlin kernel for Jupyter will use the higher version of `okio`, `3.15.0`, which is requested and required by `okhttp:5.1.0`, avoiding a runtime failure. The change in the buildscript is reflected in the library's published `.pom` file. It appears that the kernel will pick the first seen version of an artifact when traversing the dependencies and does not consider dependency constraints. `okhttp` must be declared first in the pom file and `moshi`, which depends on an older version of `okio`, must be declared later. This bump without re-ordering dependencies would result in a failure as described in [Kotlin/kotlin-jupyter#484][issue] and seen in this [build scan][failing-build] from #425. [issue]: Kotlin/kotlin-jupyter#484 [failing-build]: https://scans.gradle.com/s/3mvhfatr7gduy/tests/task/:library:examplesTest/details/com.gabrielfeo.develocity.api.example.notebook.NotebooksTest/testMostFrequentBuildsNotebook()?focused-execution=1&page=eyJvdXRwdXQiOnsiMCI6NH19&top-execution=1#L795
1 parent 7e5eb95 commit 7b2e01c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jupyter-testkit = "0.12.0-398"
77
jupyter-plugin = "0.12.0-398"
88
okio = "3.15.0"
99
moshi = "1.15.2"
10-
okhttp = "4.12.0"
10+
okhttp = "5.1.0"
1111
retrofit = "3.0.0"
1212
kotlin-coroutines = "1.10.2"
1313
kotlin-binary-compatibility-validator = "0.18.1"

library/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@ tasks.processJupyterApiResources {
1616
)
1717
}
1818

19+
// Order matters as this library is used as a Kotlin Jupyter kernel dependency (see #440)
1920
dependencies {
2021
constraints {
2122
implementation(libs.okio)
2223
}
23-
api(libs.moshi)
24-
implementation(libs.moshi.kotlin)
2524
api(libs.okhttp)
2625
implementation(libs.okhttp.logging.interceptor)
2726
api(libs.retrofit)
2827
implementation(libs.retrofit.converter.moshi)
2928
implementation(libs.retrofit.converter.scalars)
29+
api(libs.moshi)
30+
implementation(libs.moshi.kotlin)
3031
api(libs.kotlin.coroutines)
3132
implementation(libs.slf4j.api)
3233
runtimeOnly(libs.slf4j.simple)

0 commit comments

Comments
 (0)