mirror of https://github.com/grpc/grpc-java.git
Update README etc to reference 1.47.0, protobuf plugin 0.8.18
This commit is contained in:
parent
84edc33239
commit
1b620847ad
34
README.md
34
README.md
|
@ -31,8 +31,8 @@ For a guided tour, take a look at the [quick start
|
|||
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
|
||||
basics](https://grpc.io/docs/languages/java/basics).
|
||||
|
||||
The [examples](https://github.com/grpc/grpc-java/tree/v1.45.1/examples) and the
|
||||
[Android example](https://github.com/grpc/grpc-java/tree/v1.45.1/examples/android)
|
||||
The [examples](https://github.com/grpc/grpc-java/tree/v1.47.0/examples) and the
|
||||
[Android example](https://github.com/grpc/grpc-java/tree/v1.47.0/examples/android)
|
||||
are standalone projects that showcase the usage of gRPC.
|
||||
|
||||
Download
|
||||
|
@ -43,18 +43,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
|
|||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-netty-shaded</artifactId>
|
||||
<version>1.45.1</version>
|
||||
<version>1.47.0</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-protobuf</artifactId>
|
||||
<version>1.45.1</version>
|
||||
<version>1.47.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-stub</artifactId>
|
||||
<version>1.45.1</version>
|
||||
<version>1.47.0</version>
|
||||
</dependency>
|
||||
<dependency> <!-- necessary for Java 9+ -->
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
|
@ -66,23 +66,23 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
|
|||
|
||||
Or for Gradle with non-Android, add to your dependencies:
|
||||
```gradle
|
||||
runtimeOnly 'io.grpc:grpc-netty-shaded:1.45.1'
|
||||
implementation 'io.grpc:grpc-protobuf:1.45.1'
|
||||
implementation 'io.grpc:grpc-stub:1.45.1'
|
||||
runtimeOnly 'io.grpc:grpc-netty-shaded:1.47.0'
|
||||
implementation 'io.grpc:grpc-protobuf:1.47.0'
|
||||
implementation 'io.grpc:grpc-stub:1.47.0'
|
||||
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
|
||||
```
|
||||
|
||||
For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
|
||||
`grpc-protobuf-lite` instead of `grpc-protobuf`:
|
||||
```gradle
|
||||
implementation 'io.grpc:grpc-okhttp:1.45.1'
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.45.1'
|
||||
implementation 'io.grpc:grpc-stub:1.45.1'
|
||||
implementation 'io.grpc:grpc-okhttp:1.47.0'
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.47.0'
|
||||
implementation 'io.grpc:grpc-stub:1.47.0'
|
||||
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
|
||||
```
|
||||
|
||||
[the JARs]:
|
||||
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.45.1
|
||||
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.47.0
|
||||
|
||||
Development snapshots are available in [Sonatypes's snapshot
|
||||
repository](https://oss.sonatype.org/content/repositories/snapshots/).
|
||||
|
@ -114,7 +114,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
|
|||
<configuration>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.19.2:exe:${os.detected.classifier}</protocArtifact>
|
||||
<pluginId>grpc-java</pluginId>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.45.1:exe:${os.detected.classifier}</pluginArtifact>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.47.0:exe:${os.detected.classifier}</pluginArtifact>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
@ -135,7 +135,7 @@ For non-Android protobuf-based codegen integrated with the Gradle build system,
|
|||
you can use [protobuf-gradle-plugin][]:
|
||||
```gradle
|
||||
plugins {
|
||||
id 'com.google.protobuf' version '0.8.17'
|
||||
id 'com.google.protobuf' version '0.8.18'
|
||||
}
|
||||
|
||||
protobuf {
|
||||
|
@ -144,7 +144,7 @@ protobuf {
|
|||
}
|
||||
plugins {
|
||||
grpc {
|
||||
artifact = 'io.grpc:protoc-gen-grpc-java:1.45.1'
|
||||
artifact = 'io.grpc:protoc-gen-grpc-java:1.47.0'
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
|
@ -168,7 +168,7 @@ use protobuf-gradle-plugin but specify the 'lite' options:
|
|||
|
||||
```gradle
|
||||
plugins {
|
||||
id 'com.google.protobuf' version '0.8.17'
|
||||
id 'com.google.protobuf' version '0.8.18'
|
||||
}
|
||||
|
||||
protobuf {
|
||||
|
@ -177,7 +177,7 @@ protobuf {
|
|||
}
|
||||
plugins {
|
||||
grpc {
|
||||
artifact = 'io.grpc:protoc-gen-grpc-java:1.45.1'
|
||||
artifact = 'io.grpc:protoc-gen-grpc-java:1.47.0'
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
|
|
|
@ -26,7 +26,7 @@ In your app module's `build.gradle` file, include a dependency on both `grpc-cro
|
|||
Google Play Services Client Library for Cronet
|
||||
|
||||
```
|
||||
implementation 'io.grpc:grpc-cronet:1.45.1'
|
||||
implementation 'io.grpc:grpc-cronet:1.47.0'
|
||||
implementation 'com.google.android.gms:play-services-cronet:16.0.0'
|
||||
```
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ In your `build.gradle` file, include a dependency on both `grpc-android` and
|
|||
`grpc-okhttp`:
|
||||
|
||||
```
|
||||
implementation 'io.grpc:grpc-android:1.45.1'
|
||||
implementation 'io.grpc:grpc-okhttp:1.45.1'
|
||||
implementation 'io.grpc:grpc-android:1.47.0'
|
||||
implementation 'io.grpc:grpc-okhttp:1.47.0'
|
||||
```
|
||||
|
||||
You also need permission to access the device's network state in your
|
||||
|
|
Loading…
Reference in New Issue