Skip to content

Commit

Permalink
Prepare for release 4.4.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
squarejesse committed Feb 17, 2020
1 parent 3f946d0 commit 44124ba
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 13 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
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
_2020-01-07_
Expand Down Expand Up @@ -216,6 +253,7 @@ _2019-06-03_
[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
[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/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ Releases

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
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.
Expand All @@ -113,10 +113,10 @@ MockWebServer

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
testImplementation("com.squareup.okhttp3:mockwebserver:4.3.1")
testImplementation("com.squareup.okhttp3:mockwebserver:4.4.0")
```

License
Expand Down
20 changes: 19 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ext.publishedArtifactId = { project ->
allprojects {
group = 'com.squareup.okhttp3'
project.ext.artifactId = rootProject.ext.publishedArtifactId(project)
version = '4.4.0-SNAPSHOT'
version = '4.4.0'

repositories {
mavenCentral()
Expand Down Expand Up @@ -269,13 +269,20 @@ subprojects { project ->
from components.java
}
pom {
name = project.name
description = 'Square’s meticulous HTTP client for Java and Kotlin.'
url = 'https://square.github.io/okhttp/'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Square, Inc.'
}
}
scm {
connection = 'scm:git:https://github.com/square/okhttp.git'
developerConnection = 'scm:git:ssh://[email protected]/square/okhttp.git'
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Cutting a Release
sed -i "" \
"s/\/com.squareup.okhttp3\/\([^\:]*\)\/[^\/]*\//\/com.squareup.okhttp3\/\1\/$RELEASE_VERSION\//g" \
`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
Expand Down
2 changes: 1 addition & 1 deletion mockwebserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ server.setDispatcher(dispatcher);
### Download

```kotlin
testImplementation("com.squareup.okhttp3:mockwebserver:4.3.1")
testImplementation("com.squareup.okhttp3:mockwebserver:4.4.0")
```

### License
Expand Down
2 changes: 1 addition & 1 deletion okhttp-brotli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OkHttpClient client = new OkHttpClient.Builder()
```

```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
2 changes: 1 addition & 1 deletion okhttp-dnsoverhttps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ API is not considered stable and may change at any time.
### Download

```kotlin
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:4.3.1")
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:4.4.0")
```
2 changes: 1 addition & 1 deletion okhttp-logging-interceptor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Download
--------

```kotlin
implementation("com.squareup.okhttp3:logging-interceptor:4.3.1")
implementation("com.squareup.okhttp3:logging-interceptor:4.4.0")
```


Expand Down
2 changes: 1 addition & 1 deletion okhttp-sse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ API is not considered stable and may change at any time.
### Download

```kotlin
testImplementation("com.squareup.okhttp3:okhttp-sse:4.3.1")
testImplementation("com.squareup.okhttp3:okhttp-sse:4.4.0")
```
2 changes: 1 addition & 1 deletion okhttp-tls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Download
--------

```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/
Expand Down
2 changes: 1 addition & 1 deletion okhttp-urlconnection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ This module integrates OkHttp with `Authenticator` and `CookieHandler` from `jav
### Download

```kotlin
testImplementation("com.squareup.okhttp3:okhttp-urlconnection:4.3.1")
testImplementation("com.squareup.okhttp3:okhttp-urlconnection:4.4.0")
```

0 comments on commit 44124ba

Please sign in to comment.