mirror of
https://github.com/square/okhttp.git
synced 2025-08-07 12:42:57 +03:00
New releasing guide.
Also make readmes offer artifacts with Gradle syntax
This commit is contained in:
@@ -33,13 +33,11 @@ critical fixes to the [3.12.x branch][okhttp_312x] through December 31, 2020.
|
|||||||
Download
|
Download
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Download [the latest JAR][okhttp_latest_jar] or configure this dependency:
|
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
implementation("com.squareup.okhttp3:okhttp:3.14.2")
|
implementation("com.squareup.okhttp3:okhttp:3.14.2")
|
||||||
```
|
```
|
||||||
|
|
||||||
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
|
Snapshot builds are [available][snap].
|
||||||
|
|
||||||
|
|
||||||
MockWebServer
|
MockWebServer
|
||||||
@@ -51,8 +49,7 @@ MockWebServer coupling with OkHttp is essential for proper testing of HTTP/2 so
|
|||||||
|
|
||||||
### Download
|
### Download
|
||||||
|
|
||||||
Download [the latest JAR][mockwebserver_latest_jar] or configure this dependency:
|
```kotlin
|
||||||
```xml
|
|
||||||
testImplementation("com.squareup.okhttp3:mockwebserver:3.14.2")
|
testImplementation("com.squareup.okhttp3:mockwebserver:3.14.2")
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -81,9 +78,7 @@ License
|
|||||||
|
|
||||||
|
|
||||||
[conscrypt]: https://github.com/google/conscrypt/
|
[conscrypt]: https://github.com/google/conscrypt/
|
||||||
[mockwebserver_latest_jar]: https://search.maven.org/remote_content?g=com.squareup.okhttp3&a=mockwebserver&v=LATEST
|
|
||||||
[okhttp_312x]: https://github.com/square/okhttp/tree/okhttp_3.12.x
|
[okhttp_312x]: https://github.com/square/okhttp/tree/okhttp_3.12.x
|
||||||
[okhttp_latest_jar]: https://search.maven.org/remote_content?g=com.squareup.okhttp3&a=okhttp&v=LATEST
|
|
||||||
[okio]: https://github.com/square/okio/
|
[okio]: https://github.com/square/okio/
|
||||||
[snap]: https://oss.sonatype.org/content/repositories/snapshots/
|
[snap]: https://oss.sonatype.org/content/repositories/snapshots/
|
||||||
[tls_history]: https://github.com/square/okhttp/wiki/TLS-Configuration-History
|
[tls_history]: https://github.com/square/okhttp/wiki/TLS-Configuration-History
|
||||||
|
47
RELEASING.md
Normal file
47
RELEASING.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
Releasing
|
||||||
|
=========
|
||||||
|
|
||||||
|
1. Update `CHANGELOG.md`.
|
||||||
|
|
||||||
|
2. Set versions:
|
||||||
|
|
||||||
|
```
|
||||||
|
export RELEASE_VERSION=X.Y.Z
|
||||||
|
export NEXT_VERSION=X.Y.Z-SNAPSHOT
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Update, build, and upload:
|
||||||
|
|
||||||
|
```
|
||||||
|
sed -i "" \
|
||||||
|
"s/VERSION_NAME=.*/VERSION_NAME=$RELEASE_VERSION/g" \
|
||||||
|
gradle.properties
|
||||||
|
sed -i "" \
|
||||||
|
"s/\"com.squareup.okhttp3:\([^\:]*\):[^\"]*\"/\"com.squareup.okhttp3:\1:$RELEASE_VERSION\"/g" \
|
||||||
|
`find . -name "README.md"`
|
||||||
|
./gradlew clean uploadArchives
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Visit [Sonatype Nexus](https://oss.sonatype.org/) to promote the artifact. Or drop it if there is a problem!
|
||||||
|
|
||||||
|
5. Tag the release, prepare for the next one, and push to GitHub.
|
||||||
|
|
||||||
|
```
|
||||||
|
git commit -am "Prepare for release $RELEASE_VERSION."
|
||||||
|
git tag -a parent-$RELEASE_VERSION -m "Version $RELEASE_VERSION"
|
||||||
|
sed -i "" \
|
||||||
|
"s/VERSION_NAME=.*/VERSION_NAME=$NEXT_VERSION/g" \
|
||||||
|
gradle.properties
|
||||||
|
git commit -am "Prepare next development version."
|
||||||
|
git push && git push --tags
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Prerequisites
|
||||||
|
-------------
|
||||||
|
|
||||||
|
In `~/.gradle/gradle.properties`, set the following:
|
||||||
|
|
||||||
|
* `SONATYPE_NEXUS_USERNAME` - Sonatype username for releasing to `com.squareup`.
|
||||||
|
* `SONATYPE_NEXUS_PASSWORD` - Sonatype password for releasing to `com.squareup`.
|
||||||
|
|
@@ -140,19 +140,8 @@ server.setDispatcher(dispatcher);
|
|||||||
|
|
||||||
### Download
|
### Download
|
||||||
|
|
||||||
Get MockWebServer via Maven:
|
```kotlin
|
||||||
```xml
|
testImplementation("com.squareup.okhttp3:mockwebserver:3.14.2")
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>mockwebserver</artifactId>
|
|
||||||
<version>(insert latest version)</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
```
|
|
||||||
|
|
||||||
or via Gradle
|
|
||||||
```groovy
|
|
||||||
testImplementation 'com.squareup.okhttp3:mockwebserver:(insert latest version)'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
@@ -3,3 +3,9 @@ OkHttp DNS over HTTPS Implementation
|
|||||||
|
|
||||||
This module is an experimental implementation of DNS over HTTPS using OkHttp.
|
This module is an experimental implementation of DNS over HTTPS using OkHttp.
|
||||||
API is not considered stable and may change at any time.
|
API is not considered stable and may change at any time.
|
||||||
|
|
||||||
|
### Download
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:3.14.2")
|
||||||
|
```
|
||||||
|
@@ -36,18 +36,8 @@ logging.redactHeader("Cookie");
|
|||||||
Download
|
Download
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Get via Maven:
|
```kotlin
|
||||||
```xml
|
implementation("com.squareup.okhttp3:logging-interceptor:3.14.2")
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>logging-interceptor</artifactId>
|
|
||||||
<version>(insert latest version)</version>
|
|
||||||
</dependency>
|
|
||||||
```
|
|
||||||
|
|
||||||
or via Gradle
|
|
||||||
```groovy
|
|
||||||
implementation 'com.squareup.okhttp3:logging-interceptor:(insert latest version)'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@@ -3,3 +3,9 @@ OkHttp Server-Sent Events
|
|||||||
|
|
||||||
Experimental support for server-sent events.
|
Experimental support for server-sent events.
|
||||||
API is not considered stable and may change at any time.
|
API is not considered stable and may change at any time.
|
||||||
|
|
||||||
|
### Download
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
testImplementation("com.squareup.okhttp3:okhttp-sse:3.14.2")
|
||||||
|
```
|
||||||
|
@@ -226,18 +226,8 @@ clients use `HeldCertificate.Builder.rsa2048()`.
|
|||||||
Download
|
Download
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Get via Maven:
|
```kotlin
|
||||||
```xml
|
implementation("com.squareup.okhttp3:okhttp-tls:3.14.2")
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp-tls</artifactId>
|
|
||||||
<version>(insert latest version)</version>
|
|
||||||
</dependency>
|
|
||||||
```
|
|
||||||
|
|
||||||
or via Gradle
|
|
||||||
```groovy
|
|
||||||
implementation 'com.squareup.okhttp3:okhttp-tls:(insert latest version)'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
[held_certificate]: http://square.github.io/okhttp/3.x/okhttp-tls/okhttp3/tls/HeldCertificate.html
|
[held_certificate]: http://square.github.io/okhttp/3.x/okhttp-tls/okhttp3/tls/HeldCertificate.html
|
||||||
|
10
okhttp-urlconnection/README.md
Normal file
10
okhttp-urlconnection/README.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
OkHttp URLConnection
|
||||||
|
====================
|
||||||
|
|
||||||
|
This module integrates OkHttp with `Authenticator` and `CookieHandler` from `java.net`.
|
||||||
|
|
||||||
|
### Download
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
testImplementation("com.squareup.okhttp3:okhttp-urlconnection:3.14.2")
|
||||||
|
```
|
Reference in New Issue
Block a user