From 8bd6c990a728955f91646156b78244061ea91a2a Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Sun, 18 Nov 2018 16:23:34 -0500 Subject: [PATCH] Prepare next development version --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ README.md | 20 +++++--------------- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b8d177c6b..46d49c8b79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,40 @@ Change Log ========== +Version 2.5.0 *(2018-11-18)* +============================ + + * New: Built-in support for Kotlin's `Unit` type. This behaves the same as Java's `Void` where the body + content is ignored and immediately discarded. + * New: Build-in support for Java 8's `Optional` and `CompletableFuture` types. Previously the 'converter-java8' + and 'adapter-java8' dependencies were needed and explicitly adding `Java8OptionalConverterFactory` and/or + `Java8CallAdapterFactory` to your `Retrofit.Builder` in order to use these types. Support is now built-in and + those types and their artifacts are marked as deprecated. + * New: `Invocation` class provides a reference to the invoked method and argument list as a tag on the + underlying OkHttp `Call`. This can be accessed from an OkHttp interceptor for things like logging, analytics, + or metrics aggregation. + * New: Kotlin extension for `Retrofit` which allows you call `create` passing the interface type only as + a generic parameter (e.g., `retrofit.create()`). + * New: Added `Response.success` overload which allows specifying a custom 2xx status code. + * New: Added `Call.failure` overload which allows passing any `Throwable` subtype. + * New: Minimal R8 rules now ship inside the jar requiring no client configuration in the common case. + * Fix: Do not propagate fatal errors to the callback. They are sent to the thread's uncaught + exception handler. + * Fix: Do not enqueue/execute an otherwise useless call when the RxJava type is disposed by `onSubscribe`. + * Fix: Call `RxJavaPlugins` assembly hook when creating an RxJava 2 type. + * Fix: Ensure both the Guava and Java 8 `Optional` converters delegate properly. This ensures that converters + registered prior to the optional converter can be used for deserializing the body type. + * Fix: Prevent `@Path` values from participating in path-traversal. This ensures untrusted input passed as + a path value cannot cause you to make a request to an un-intended relative URL. + * Fix: Simple XML converter (which is deprecated) no longer wraps subtypes of `RuntimeException` + or `IOException` when it fails. + * Fix: Prevent JAXB converter from loading remote entities and DTDs. + * Fix: Correctly detect default methods in interfaces on Android (API 24+). These still do not work, but + now a correct exception will be thrown when detected. + * Fix: Report more accurate exceptions when a `@QueryName` or `@QueryMap` precedes a `@Url` parameter. + * Update OkHttp dependency to 3.12. + + Version 2.4.0 *(2018-03-14)* ---------------------------- diff --git a/README.md b/README.md index 5b30970a64..74d6a26f25 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,7 @@ For more information please see [the website][1]. Download -------- -Download [the latest JAR][2] or grab via Maven: -```xml - - com.squareup.retrofit2 - retrofit - 2.4.0 - -``` -or Gradle: -```groovy -implementation 'com.squareup.retrofit2:retrofit:2.4.0' -``` +Download [the latest JAR][2] or grab from Maven central at the coordinates `com.squareup.retrofit2:retrofit:2.5.0`. Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. @@ -30,10 +19,11 @@ Retrofit requires at minimum Java 7 or Android 2.3. R8 / ProGuard ------------- -If you are using R8 or ProGuard add the options from -[this file](https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro). +If you are using R8 the shrinking and obfuscation rules are included automatically. -You might also need rules for OkHttp and Okio which are dependencies of this library. +ProGuard users must manually add the options from +[this file](https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro). +(Note: You might also need rules for OkHttp and Okio which are dependencies of this library) License