From 9d5680b1e5cb373c3b09847528ca207a11e85c76 Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Mon, 18 Mar 2024 15:40:51 -0400 Subject: [PATCH] Prepare version 2.10.0 --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++++++- README.md | 2 +- RELEASING.md | 54 ++++++++++++++++++++++++++++++++++------------- gradle.properties | 2 +- 4 files changed, 88 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bc04582ba..511a9e0516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,51 @@ ## [Unreleased] +**New** + + - Nothing yet! + +**Changed** + + - Nothing yet! + +**Fixed** + + - Nothing yet! + + +## [2.10.0] - 2024-03-18 + +**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/](https://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](https://github.com/square/retrofit/tree/trunk/retrofit-response-type-keeper#readme). + +**Changed** +- Add shrinker rules to retain the generic signatures of built-in types (`Call`, `Response`, etc.) which are used via reflection at runtime. +- Remove backpressure support from RxJava 2 and 3 adapters. Since we only deliver a single value and the Reactive Streams specification states that callers must request a non-zero subscription value, we never need to honor backpressure. +- Kotlin `Retrofit.create` function now has a non-null lower bound. Even if you specified a nullable type before this function would never return null. +- Suspend functions now capture and defer all `Throwable` subtypes (not just `Exception` subtypes) to avoid Java's `UndeclaredThrowableException` when thrown synchronously. +- Eagerly reject `suspend fun` functions that return `Call`. These are never correct, and should declare a return type of `Body` directly. +- Support for Java 14-specific and Java 16-specific reflection needed to invoke default methods on interfaces have been moved to separate versions of a class through a multi-release jar. This should have no observable impact other than the jar now contains classes which target Java 14 and Java 16 bytecode that might trip up some static analysis tools which are not aware of multi-release jars. +- Parameter names are now displayed in exception messages when available in the underlying Java bytecode. +- Jackson converter now supports binary formats by using byte streams rather than character streams in its implementation. Use the `create(ObjectMapper, MediaType)` overload to supply the value of the `Content-Type` header for your format. + +**Fixed** +- Do not include synthetic methods when doing eager validation. +- Use per-method rather than per-class locking when parsing annotations. This eliminates contention when multiple calls are made in quick succession at the beginning of the process lifetime. + ## [2.9.0] - 2020-05-20 @@ -619,7 +664,8 @@ Initial release. -[Unreleased]: https://github.com/square/retrofit/compare/2.9.0...HEAD +[Unreleased]: https://github.com/square/retrofit/compare/2.10.0...HEAD +[2.10.0]: https://github.com/square/retrofit/releases/tag/2.10.0 [2.9.0]: https://github.com/square/retrofit/releases/tag/2.9.0 [2.8.2]: https://github.com/square/retrofit/releases/tag/2.8.2 [2.8.1]: https://github.com/square/retrofit/releases/tag/parent-2.8.1 diff --git a/README.md b/README.md index c21c5472eb..614c1f9c61 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ For more information please see [the website][1]. Download -------- -Download [the latest JAR][2] or grab from Maven central at the coordinates `com.squareup.retrofit2:retrofit:2.9.0`. +Download [the latest JAR][2] or grab from Maven central at the coordinates `com.squareup.retrofit2:retrofit:2.10.0`. Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. diff --git a/RELEASING.md b/RELEASING.md index 114df91a33..83f3747196 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,15 +1,39 @@ -Releasing -======== - - 1. Change the version in `gradle.properties` to a non-SNAPSHOT verson. - 2. Update the `CHANGELOG.md` for the impending release. - 3. Update the `README.md` with the new version. - 4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) - 5. `./gradlew clean uploadArchives`. - 6. Visit [Sonatype Nexus](https://s01.oss.sonatype.org/) and promote the artifact. - 7. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) - 8. Update the `gradle.properties` to the next SNAPSHOT version. - 9. `git commit -am "Prepare next development version."` - 10. `git push && git push --tags` - -If step 5 or 6 fails, drop the Sonatype repo, fix the problem, commit, and start again at step 5. +# Releasing + +1. Update the `VERSION_NAME` in `gradle.properties` to the release version. + +2. Update the `CHANGELOG.md`: + 1. Change the `Unreleased` header to the release version. + 2. Add a link URL to ensure the header link works. + 3. Add a new `Unreleased` section to the top. + +3. Update the `README.md` so the "Download" section reflects the new release version. + +4. Commit + + ``` + $ git commit -am "Prepare version X.Y.Z" + ``` + +5. Tag + + ``` + $ git tag -am "Version X.Y.Z" X.Y.Z + ``` + +6. Update the `VERSION_NAME` in `gradle.properties` to the next "SNAPSHOT" version. + +7. Commit + + ``` + $ git commit -am "Prepare next development version" + ``` + +8. Push! + + ``` + $ git push && git push --tags + ``` + + This will trigger a GitHub Action workflow which will create a GitHub release and upload the + release artifacts to Maven Central. diff --git a/gradle.properties b/gradle.properties index 3fa6f45eeb..5f96cf3708 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.squareup.retrofit2 -VERSION_NAME=2.10.0-SNAPSHOT +VERSION_NAME=2.10.0 POM_URL=https://github.com/square/retrofit POM_SCM_URL=https://github.com/square/retrofit/