Skip to content

Commit

Permalink
Prepare version 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Mar 18, 2024
1 parent a629eda commit 9d5680b
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 18 deletions.
48 changes: 47 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Body>`. 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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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].

Expand Down
54 changes: 39 additions & 15 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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/
Expand Down

0 comments on commit 9d5680b

Please sign in to comment.