1
0
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:
Jesse Wilson
2019-05-25 21:26:22 -04:00
parent a26d8faa2d
commit 0bca781fc3
8 changed files with 77 additions and 44 deletions

View File

@@ -33,13 +33,11 @@ critical fixes to the [3.12.x branch][okhttp_312x] through December 31, 2020.
Download
--------
Download [the latest JAR][okhttp_latest_jar] or configure this dependency:
```kotlin
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
@@ -51,8 +49,7 @@ MockWebServer coupling with OkHttp is essential for proper testing of HTTP/2 so
### Download
Download [the latest JAR][mockwebserver_latest_jar] or configure this dependency:
```xml
```kotlin
testImplementation("com.squareup.okhttp3:mockwebserver:3.14.2")
```
@@ -81,9 +78,7 @@ License
[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_latest_jar]: https://search.maven.org/remote_content?g=com.squareup.okhttp3&a=okhttp&v=LATEST
[okio]: https://github.com/square/okio/
[snap]: https://oss.sonatype.org/content/repositories/snapshots/
[tls_history]: https://github.com/square/okhttp/wiki/TLS-Configuration-History

47
RELEASING.md Normal file
View 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`.

View File

@@ -140,19 +140,8 @@ server.setDispatcher(dispatcher);
### Download
Get MockWebServer via Maven:
```xml
<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)'
```kotlin
testImplementation("com.squareup.okhttp3:mockwebserver:3.14.2")
```
### License

View File

@@ -3,3 +3,9 @@ OkHttp DNS over HTTPS Implementation
This module is an experimental implementation of DNS over HTTPS using OkHttp.
API is not considered stable and may change at any time.
### Download
```kotlin
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:3.14.2")
```

View File

@@ -36,18 +36,8 @@ logging.redactHeader("Cookie");
Download
--------
Get via Maven:
```xml
<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)'
```kotlin
implementation("com.squareup.okhttp3:logging-interceptor:3.14.2")
```

View File

@@ -3,3 +3,9 @@ OkHttp Server-Sent Events
Experimental support for server-sent events.
API is not considered stable and may change at any time.
### Download
```kotlin
testImplementation("com.squareup.okhttp3:okhttp-sse:3.14.2")
```

View File

@@ -226,18 +226,8 @@ clients use `HeldCertificate.Builder.rsa2048()`.
Download
--------
Get via Maven:
```xml
<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)'
```kotlin
implementation("com.squareup.okhttp3:okhttp-tls:3.14.2")
```
[held_certificate]: http://square.github.io/okhttp/3.x/okhttp-tls/okhttp3/tls/HeldCertificate.html

View 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")
```