Skip to content

Commit a56e5f6

Browse files
bmanderclaude
andauthored
Swap archived JakeWharton serialization converter for Retrofit's upstream (#1910) (#1925)
The `com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter` artifact was archived when the converter was upstreamed into Retrofit as `com.squareup.retrofit2:converter-kotlinx-serialization`. The JW artifact is frozen at 1.0.0 (built against Retrofit 2.x/OkHttp 4.x) and Dependabot will never update it — after the retrofit 2→3 (#1855) and okhttp 4→5 (#1854) major bumps it was the one leg of the network stack still pinned to the old majors. Swap the coordinate to the upstream converter (versioned with retrofit, so it tracks the same version.ref and dependabot bumps) and update the `asConverterFactory` import at both call sites. The API is identical. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 2397af9 commit a56e5f6

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ composeBom = "2026.06.01"
6969
materialIcons = "1.7.8"
7070
retrofit = "3.0.0"
7171
okhttp = "5.4.0"
72-
retrofitKotlinxConverter = "1.0.0"
7372
kotlinxSerializationJson = "1.11.0"
7473
coroutines = "1.11.0"
7574
material = "1.14.0"
@@ -151,7 +150,7 @@ hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", ve
151150
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
152151
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
153152
okhttp-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
154-
retrofit-kotlinx-serialization-converter = { module = "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter", version.ref = "retrofitKotlinxConverter" }
153+
retrofit-kotlinx-serialization-converter = { module = "com.squareup.retrofit2:converter-kotlinx-serialization", version.ref = "retrofit" }
155154
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
156155
apollo-runtime = { module = "com.apollographql.apollo:apollo-runtime", version.ref = "apollo" }
157156
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }

onebusaway-android/src/main/java/org/onebusaway/android/api/net/ObaApiProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
package org.onebusaway.android.api.net
1717

1818
import android.net.Uri
19-
import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory
2019
import java.io.IOException
2120
import javax.inject.Inject
2221
import javax.inject.Singleton
2322
import kotlinx.serialization.json.Json
2423
import okhttp3.MediaType.Companion.toMediaType
2524
import okhttp3.OkHttpClient
2625
import org.onebusaway.android.api.contract.ObaWebService
26+
import retrofit2.converter.kotlinx.serialization.asConverterFactory
2727
import retrofit2.Retrofit
2828

2929
/**

onebusaway-android/src/main/java/org/onebusaway/android/app/di/NetworkModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import org.onebusaway.android.api.contract.RegionsWebService
3535
import org.onebusaway.android.api.contract.ReminderWebService
3636
import org.onebusaway.android.api.contract.SurveyWebService
3737
import org.onebusaway.android.api.contract.WeatherWebService
38-
import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory
38+
import retrofit2.converter.kotlinx.serialization.asConverterFactory
3939
import retrofit2.Retrofit
4040

4141
/**

0 commit comments

Comments
 (0)