1
0
mirror of https://github.com/square/okhttp.git synced 2025-07-31 05:04:26 +03:00

Prepare for release 4.4.0.

This commit is contained in:
Jesse Wilson
2020-02-17 17:51:22 -05:00
parent 3f946d0b13
commit 44124ba2a3
11 changed files with 69 additions and 13 deletions

View File

@ -1,6 +1,43 @@
Change Log Change Log
========== ==========
## Version 4.4.0
_2020-02-17_
* New: Support `canceled()` as an event that can be observed by `EventListener`. This should be
useful for splitting out canceled calls in metrics.
* New: Publish a [bill of materials (BOM)][bom] for OkHttp. Depend on this from Gradle or Maven to
keep all of your OkHttp artifacts on the same version, even if they're declared via transitive
dependencies. You can even omit versions when declaring other OkHttp dependencies.
```kotlin
dependencies {
api(platform("com.squareup.okhttp3:okhttp-bom:4.4.0"))
api("com.squareup.okhttp3:okhttp") // No version!
api("com.squareup.okhttp3:logging-interceptor") // No version!
}
```
* New: Upgrade to Okio 2.4.3.
```kotlin
implementation("com.squareup.okio:okio:2.4.3")
```
* Fix: Limit retry attempts for HTTP/2 `REFUSED_STREAM` and `CANCEL` failures.
* Fix: Retry automatically when incorrectly sharing a connection among multiple hostnames. OkHttp
shares connections when hosts share both IP addresses and certificates, such as `squareup.com`
and `www.squareup.com`. If a server refuses such sharing it will return HTTP 421 and OkHttp will
automatically retry on an unshared connection.
* Fix: Don't crash if a TLS tunnel's response body is truncated.
* Fix: Don't track unusable routes beyond their usefulness. We had a bug where we could track
certain bad routes indefinitely; now we only track the ones that could be necessary.
* Fix: Defer proxy selection until a proxy is required. This saves calls to `ProxySelector` on
calls that use a pooled connection.
## Version 4.3.1 ## Version 4.3.1
_2020-01-07_ _2020-01-07_
@ -216,6 +253,7 @@ _2019-06-03_
[Change log](http://square.github.io/okhttp/changelog_3x/) [Change log](http://square.github.io/okhttp/changelog_3x/)
[bom]: https://docs.gradle.org/6.2/userguide/platforms.html#sub:bom_import
[iana_websocket]: https://www.iana.org/assignments/websocket/websocket.txt [iana_websocket]: https://www.iana.org/assignments/websocket/websocket.txt
[okhttp4_blog_post]: https://cashapp.github.io/2019-06-26/okhttp-4-goes-kotlin [okhttp4_blog_post]: https://cashapp.github.io/2019-06-26/okhttp-4-goes-kotlin
[upgrading_to_okhttp_4]: https://square.github.io/okhttp/upgrading_to_okhttp_4/ [upgrading_to_okhttp_4]: https://square.github.io/okhttp/upgrading_to_okhttp_4/

View File

@ -99,10 +99,10 @@ Releases
Our [change log][changelog] has release history. Our [change log][changelog] has release history.
The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/okhttp/4.3.1/jar). The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/okhttp/4.4.0/jar).
```kotlin ```kotlin
implementation("com.squareup.okhttp3:okhttp:4.3.1") implementation("com.squareup.okhttp3:okhttp:4.4.0")
``` ```
Snapshot builds are [available][snap]. [R8 and ProGuard][r8_proguard] rules are available. Snapshot builds are [available][snap]. [R8 and ProGuard][r8_proguard] rules are available.
@ -113,10 +113,10 @@ MockWebServer
OkHttp includes a library for testing HTTP, HTTPS, and HTTP/2 clients. OkHttp includes a library for testing HTTP, HTTPS, and HTTP/2 clients.
The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/mockwebserver/4.3.1/jar). The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/mockwebserver/4.4.0/jar).
```kotlin ```kotlin
testImplementation("com.squareup.okhttp3:mockwebserver:4.3.1") testImplementation("com.squareup.okhttp3:mockwebserver:4.4.0")
``` ```
License License

View File

@ -90,7 +90,7 @@ ext.publishedArtifactId = { project ->
allprojects { allprojects {
group = 'com.squareup.okhttp3' group = 'com.squareup.okhttp3'
project.ext.artifactId = rootProject.ext.publishedArtifactId(project) project.ext.artifactId = rootProject.ext.publishedArtifactId(project)
version = '4.4.0-SNAPSHOT' version = '4.4.0'
repositories { repositories {
mavenCentral() mavenCentral()
@ -269,6 +269,8 @@ subprojects { project ->
from components.java from components.java
} }
pom { pom {
name = project.name
description = 'Squares meticulous HTTP client for Java and Kotlin.'
url = 'https://square.github.io/okhttp/' url = 'https://square.github.io/okhttp/'
licenses { licenses {
license { license {
@ -276,6 +278,11 @@ subprojects { project ->
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
} }
} }
developers {
developer {
name = 'Square, Inc.'
}
}
scm { scm {
connection = 'scm:git:https://github.com/square/okhttp.git' connection = 'scm:git:https://github.com/square/okhttp.git'
developerConnection = 'scm:git:ssh://git@github.com/square/okhttp.git' developerConnection = 'scm:git:ssh://git@github.com/square/okhttp.git'
@ -284,6 +291,17 @@ subprojects { project ->
} }
} }
} }
repositories {
maven {
name = "mavencentral"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username System.getenv('SONATYPE_NEXUS_USERNAME')
password System.getenv('SONATYPE_NEXUS_PASSWORD')
}
}
}
} }
signing { signing {

View File

@ -86,7 +86,7 @@ Cutting a Release
sed -i "" \ sed -i "" \
"s/\/com.squareup.okhttp3\/\([^\:]*\)\/[^\/]*\//\/com.squareup.okhttp3\/\1\/$RELEASE_VERSION\//g" \ "s/\/com.squareup.okhttp3\/\([^\:]*\)\/[^\/]*\//\/com.squareup.okhttp3\/\1\/$RELEASE_VERSION\//g" \
`find . -name "README.md"` `find . -name "README.md"`
./gradlew clean uploadArchives ./gradlew clean publishAllPublicationsToMavencentralRepository
``` ```
5. Visit [Sonatype Nexus][sonatype_nexus] to promote (close then release) the artifact. Or drop it 5. Visit [Sonatype Nexus][sonatype_nexus] to promote (close then release) the artifact. Or drop it

View File

@ -142,7 +142,7 @@ server.setDispatcher(dispatcher);
### Download ### Download
```kotlin ```kotlin
testImplementation("com.squareup.okhttp3:mockwebserver:4.3.1") testImplementation("com.squareup.okhttp3:mockwebserver:4.4.0")
``` ```
### License ### License

View File

@ -14,7 +14,7 @@ OkHttpClient client = new OkHttpClient.Builder()
``` ```
```kotlin ```kotlin
implementation("com.squareup.okhttp3:okhttp-brotli:4.3.1") implementation("com.squareup.okhttp3:okhttp-brotli:4.4.0")
``` ```
[1]: https://github.com/google/brotli [1]: https://github.com/google/brotli

View File

@ -7,5 +7,5 @@ API is not considered stable and may change at any time.
### Download ### Download
```kotlin ```kotlin
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:4.3.1") testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:4.4.0")
``` ```

View File

@ -37,7 +37,7 @@ Download
-------- --------
```kotlin ```kotlin
implementation("com.squareup.okhttp3:logging-interceptor:4.3.1") implementation("com.squareup.okhttp3:logging-interceptor:4.4.0")
``` ```

View File

@ -7,5 +7,5 @@ API is not considered stable and may change at any time.
### Download ### Download
```kotlin ```kotlin
testImplementation("com.squareup.okhttp3:okhttp-sse:4.3.1") testImplementation("com.squareup.okhttp3:okhttp-sse:4.4.0")
``` ```

View File

@ -227,7 +227,7 @@ Download
-------- --------
```kotlin ```kotlin
implementation("com.squareup.okhttp3:okhttp-tls:4.3.1") implementation("com.squareup.okhttp3:okhttp-tls:4.4.0")
``` ```
[held_certificate]: http://square.github.io/okhttp/4.x/okhttp-tls/okhttp3.tls/-held-certificate/ [held_certificate]: http://square.github.io/okhttp/4.x/okhttp-tls/okhttp3.tls/-held-certificate/

View File

@ -6,5 +6,5 @@ This module integrates OkHttp with `Authenticator` and `CookieHandler` from `jav
### Download ### Download
```kotlin ```kotlin
testImplementation("com.squareup.okhttp3:okhttp-urlconnection:4.3.1") testImplementation("com.squareup.okhttp3:okhttp-urlconnection:4.4.0")
``` ```