NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Maven Central · #595 by repository stars
A BOM for managing Retrofit dependencies.
Last release 1 years ago
15 May 2025
Release timing varies
gaps range from 1 weeks to 1.1 years
Nearly every release is documented
notes for 4 of 4 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
4 releases · first in 2024
Upgrade to OkHttp 4.12 (from 3.14).
Changed
Upgrade to OkHttp 4.12 (from 3.14).
This is the version of OkHttp that is written in Kotlin, and as a result Retrofit now has a transitive Kotlin dependency. However, this is also the supported version of OkHttp whereas the previous version was out of support for nearly 4 years.
Note: The 3.x versions of Retrofit maintain forward binary-compatibility with the 2.x versions.
This means libraries compiled against 2.x can still be used with the 3.x versions.
First-party converters now support deferring serialization to happen when the request body is written (i.e., during HTTP execution) rather than when t
New
First-party converters now support deferring serialization to happen when the request body is written (i.e., during HTTP execution) rather than when the HTTP request is created. In some cases this moves conversion from a calling thread to a background thread, such as in the case when using Call.enqueue directly.
The following converters support this feature through a new withStreaming() factory method:
Fixed
@Tag now work by storing the value boxed with the boxed class as the key.One column per month.
The built-in OptionalConverterFactory is now public to allow installing it before other converters which consume all types (e.g., Moshi, Gson, Jackson
New
OptionalConverterFactory is now public to allow installing it before other converters which consume all types (e.g., Moshi, Gson, Jackson, etc.).Fixed
ClassCastException.Support using Unit as a response type. This can be used for non-body HTTP methods like HEAD or body-containing HTTP methods like GET where the body wi
New
Support using Unit as a response type. This can be used for non-body HTTP methods like HEAD or body-containing HTTP methods like GET where the body will be discarded without deserialization.
kotlinx.serialization converter!
This was imported from github.com/JakeWharton/retrofit2-kotlinx-serialization-converter/ and remains unchanged from its 1.0.0 release.
The Maven coordinates are com.squareup.retrofit2:converter-kotlinx-serialization.
JAXB 3 converter!
The Maven coordinates are com.squareup.retrofit2:converter-jaxb3.
@Header, @Headers, and @HeaderMap can now set non-ASCII values through the allowUnsafeNonAsciiValues annotation property. These are not technically compliant with the HTTP specification, but are often supported or required by services.
Publish a BOM of all modules. The Maven coordinates are com.squareup.retrofit2:retrofit-bom.
Invocation now exposes the service Class<?> and the instance on which the method was invoked. This disambiguates the source when service inheritence is used.
A response type keeper annotation processor is now available for generating shrinker rules for all referenced types in your service interface. In some cases, it's impossible for static shrinker rules to keep the entirety of what Retrofit needs at runtime. This annotation processor generates those additional rules. For more info see its README.
Changed
Call, Response, etc.) which are used via reflection at runtime.Retrofit.create function now has a non-null lower bound. Even if you specified a nullable type before this function would never return null.Throwable subtypes (not just Exception subtypes) to avoid Java's UndeclaredThrowableException when thrown synchronously.suspend fun functions that return Call<Body>. These are never correct, and should declare a return type of Body directly.create(ObjectMapper, MediaType) overload to supply the value of the Content-Type header for your format.Fixed
Your coding agent can read these notes before it upgrades. Set up the MCP server →