mirror of https://github.com/grpc/grpc-java.git
Bump Protobuf to 3.17.2
Removed some references to the protobuf version from COMPILING.md and compiler/README.md to make updates a tiny bit easier.
This commit is contained in:
parent
e51a17574f
commit
29618a6bb6
12
COMPILING.md
12
COMPILING.md
|
@ -43,11 +43,11 @@ This section is only necessary if you are making changes to the code
|
||||||
generation. Most users only need to use `skipCodegen=true` as discussed above.
|
generation. Most users only need to use `skipCodegen=true` as discussed above.
|
||||||
|
|
||||||
### Build Protobuf
|
### Build Protobuf
|
||||||
The codegen plugin is C++ code and requires protobuf 3.12.0 or later.
|
The codegen plugin is C++ code and requires protobuf 3.17.2 or later.
|
||||||
|
|
||||||
For Linux, Mac and MinGW:
|
For Linux, Mac and MinGW:
|
||||||
```
|
```
|
||||||
$ PROTOBUF_VERSION=3.12.0
|
$ PROTOBUF_VERSION=3.17.2
|
||||||
$ curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-all-$PROTOBUF_VERSION.tar.gz
|
$ curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-all-$PROTOBUF_VERSION.tar.gz
|
||||||
$ tar xzf protobuf-all-$PROTOBUF_VERSION.tar.gz
|
$ tar xzf protobuf-all-$PROTOBUF_VERSION.tar.gz
|
||||||
$ cd protobuf-$PROTOBUF_VERSION
|
$ cd protobuf-$PROTOBUF_VERSION
|
||||||
|
@ -80,16 +80,16 @@ When building on Windows and VC++, you need to specify project properties for
|
||||||
Gradle to find protobuf:
|
Gradle to find protobuf:
|
||||||
```
|
```
|
||||||
.\gradlew publishToMavenLocal ^
|
.\gradlew publishToMavenLocal ^
|
||||||
-PvcProtobufInclude=C:\path\to\protobuf-3.12.0\src ^
|
-PvcProtobufInclude=C:\path\to\protobuf\src ^
|
||||||
-PvcProtobufLibs=C:\path\to\protobuf-3.12.0\vsprojects\Release ^
|
-PvcProtobufLibs=C:\path\to\protobuf\vsprojects\Release ^
|
||||||
-PtargetArch=x86_32
|
-PtargetArch=x86_32
|
||||||
```
|
```
|
||||||
|
|
||||||
Since specifying those properties every build is bothersome, you can instead
|
Since specifying those properties every build is bothersome, you can instead
|
||||||
create ``<project-root>\gradle.properties`` with contents like:
|
create ``<project-root>\gradle.properties`` with contents like:
|
||||||
```
|
```
|
||||||
vcProtobufInclude=C:\\path\\to\\protobuf-3.12.0\\src
|
vcProtobufInclude=C:\\path\\to\\protobuf\\src
|
||||||
vcProtobufLibs=C:\\path\\to\\protobuf-3.12.0\\vsprojects\\Release
|
vcProtobufLibs=C:\\path\\to\\protobuf\\vsprojects\\Release
|
||||||
targetArch=x86_32
|
targetArch=x86_32
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ subprojects {
|
||||||
nettyVersion = '4.1.52.Final'
|
nettyVersion = '4.1.52.Final'
|
||||||
guavaVersion = '30.1-android'
|
guavaVersion = '30.1-android'
|
||||||
googleauthVersion = '0.22.2'
|
googleauthVersion = '0.22.2'
|
||||||
protobufVersion = '3.12.0'
|
protobufVersion = '3.17.2'
|
||||||
protocVersion = protobufVersion
|
protocVersion = protobufVersion
|
||||||
opencensusVersion = '0.28.0'
|
opencensusVersion = '0.28.0'
|
||||||
autovalueVersion = '1.7.4'
|
autovalueVersion = '1.7.4'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
set PROTOBUF_VER=3.12.0
|
set PROTOBUF_VER=3.17.2
|
||||||
set CMAKE_NAME=cmake-3.3.2-win32-x86
|
set CMAKE_NAME=cmake-3.3.2-win32-x86
|
||||||
|
|
||||||
if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" (
|
if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" (
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Build protoc
|
# Build protoc
|
||||||
set -evux -o pipefail
|
set -evux -o pipefail
|
||||||
|
|
||||||
PROTOBUF_VERSION=3.12.0
|
PROTOBUF_VERSION=3.17.2
|
||||||
|
|
||||||
# ARCH is x86_64 bit unless otherwise specified.
|
# ARCH is x86_64 bit unless otherwise specified.
|
||||||
ARCH="${ARCH:-x86_64}"
|
ARCH="${ARCH:-x86_64}"
|
||||||
|
|
|
@ -14,14 +14,11 @@ binaries for common platforms are available on Maven Central:
|
||||||
However, if the pre-compiled binaries are not compatible with your system,
|
However, if the pre-compiled binaries are not compatible with your system,
|
||||||
you may want to build your own codegen.
|
you may want to build your own codegen.
|
||||||
|
|
||||||
## System requirement
|
|
||||||
|
|
||||||
* Linux, Mac OS X with Clang, or Windows with MSYS2
|
|
||||||
* Java 7 or up
|
|
||||||
* [Protobuf](https://github.com/google/protobuf) 3.12.0 or up
|
|
||||||
|
|
||||||
## Compiling and testing the codegen
|
## Compiling and testing the codegen
|
||||||
Change to the `compiler` directory:
|
|
||||||
|
Set up your system as described in [COMPILING.md](../COMPILING.md).
|
||||||
|
|
||||||
|
Then change to the `compiler` directory:
|
||||||
```
|
```
|
||||||
$ cd $GRPC_JAVA_ROOT/compiler
|
$ cd $GRPC_JAVA_ROOT/compiler
|
||||||
```
|
```
|
||||||
|
|
|
@ -32,7 +32,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
protobuf {
|
protobuf {
|
||||||
protoc { artifact = 'com.google.protobuf:protoc:3.12.0' }
|
protoc { artifact = 'com.google.protobuf:protoc:3.17.2' }
|
||||||
plugins {
|
plugins {
|
||||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
protobuf {
|
protobuf {
|
||||||
protoc { artifact = 'com.google.protobuf:protoc:3.12.0' }
|
protoc { artifact = 'com.google.protobuf:protoc:3.17.2' }
|
||||||
plugins {
|
plugins {
|
||||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
protobuf {
|
protobuf {
|
||||||
protoc { artifact = 'com.google.protobuf:protoc:3.12.0' }
|
protoc { artifact = 'com.google.protobuf:protoc:3.17.2' }
|
||||||
plugins {
|
plugins {
|
||||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
protobuf {
|
protobuf {
|
||||||
protoc { artifact = 'com.google.protobuf:protoc:3.12.0' }
|
protoc { artifact = 'com.google.protobuf:protoc:3.17.2' }
|
||||||
plugins {
|
plugins {
|
||||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ targetCompatibility = 1.7
|
||||||
// Feel free to delete the comment at the next line. It is just for safely
|
// Feel free to delete the comment at the next line. It is just for safely
|
||||||
// updating the version in our release process.
|
// updating the version in our release process.
|
||||||
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
def protobufVersion = '3.12.0'
|
def protobufVersion = '3.17.2'
|
||||||
def protocVersion = protobufVersion
|
def protocVersion = protobufVersion
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -24,7 +24,7 @@ targetCompatibility = 1.7
|
||||||
// Feel free to delete the comment at the next line. It is just for safely
|
// Feel free to delete the comment at the next line. It is just for safely
|
||||||
// updating the version in our release process.
|
// updating the version in our release process.
|
||||||
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
def protocVersion = '3.12.0'
|
def protocVersion = '3.17.2'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// grpc-alts transitively depends on grpc-netty-shaded, grpc-protobuf, and grpc-stub
|
// grpc-alts transitively depends on grpc-netty-shaded, grpc-protobuf, and grpc-stub
|
||||||
|
|
|
@ -24,7 +24,7 @@ targetCompatibility = 1.7
|
||||||
// Feel free to delete the comment at the next line. It is just for safely
|
// Feel free to delete the comment at the next line. It is just for safely
|
||||||
// updating the version in our release process.
|
// updating the version in our release process.
|
||||||
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
def protobufVersion = '3.12.0'
|
def protobufVersion = '3.17.2'
|
||||||
def protocVersion = protobufVersion
|
def protocVersion = protobufVersion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||||
<protobuf.version>3.12.0</protobuf.version>
|
<protobuf.version>3.17.2</protobuf.version>
|
||||||
<!-- required for jdk9 -->
|
<!-- required for jdk9 -->
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||||||
|
|
|
@ -22,7 +22,7 @@ targetCompatibility = 1.7
|
||||||
// Feel free to delete the comment at the next line. It is just for safely
|
// Feel free to delete the comment at the next line. It is just for safely
|
||||||
// updating the version in our release process.
|
// updating the version in our release process.
|
||||||
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
def protobufVersion = '3.12.0'
|
def protobufVersion = '3.17.2'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||||
<protoc.version>3.12.0</protoc.version>
|
<protoc.version>3.17.2</protoc.version>
|
||||||
<!-- required for jdk9 -->
|
<!-- required for jdk9 -->
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||||||
|
|
|
@ -23,7 +23,7 @@ targetCompatibility = 1.7
|
||||||
// Feel free to delete the comment at the next line. It is just for safely
|
// Feel free to delete the comment at the next line. It is just for safely
|
||||||
// updating the version in our release process.
|
// updating the version in our release process.
|
||||||
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
def protobufVersion = '3.12.0'
|
def protobufVersion = '3.17.2'
|
||||||
def protocVersion = protobufVersion
|
def protocVersion = protobufVersion
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||||
<protobuf.version>3.12.0</protobuf.version>
|
<protobuf.version>3.17.2</protobuf.version>
|
||||||
<protoc.version>3.12.0</protoc.version>
|
<protoc.version>3.17.2</protoc.version>
|
||||||
<!-- required for jdk9 -->
|
<!-- required for jdk9 -->
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||||||
|
|
|
@ -24,7 +24,7 @@ targetCompatibility = 1.7
|
||||||
// Feel free to delete the comment at the next line. It is just for safely
|
// Feel free to delete the comment at the next line. It is just for safely
|
||||||
// updating the version in our release process.
|
// updating the version in our release process.
|
||||||
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
def protocVersion = '3.12.0'
|
def protocVersion = '3.17.2'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||||
<protoc.version>3.12.0</protoc.version>
|
<protoc.version>3.17.2</protoc.version>
|
||||||
<netty.tcnative.version>2.0.34.Final</netty.tcnative.version>
|
<netty.tcnative.version>2.0.34.Final</netty.tcnative.version>
|
||||||
<!-- required for jdk9 -->
|
<!-- required for jdk9 -->
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
|
|
|
@ -24,7 +24,7 @@ targetCompatibility = 1.7
|
||||||
// updating the version in our release process.
|
// updating the version in our release process.
|
||||||
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
def grpcVersion = '1.39.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
def nettyTcNativeVersion = '2.0.31.Final'
|
def nettyTcNativeVersion = '2.0.31.Final'
|
||||||
def protocVersion = '3.12.0'
|
def protocVersion = '3.17.2'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
<grpc.version>1.39.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||||
<protobuf.version>3.12.0</protobuf.version>
|
<protobuf.version>3.17.2</protobuf.version>
|
||||||
<protoc.version>3.12.0</protoc.version>
|
<protoc.version>3.17.2</protoc.version>
|
||||||
<!-- required for jdk9 -->
|
<!-- required for jdk9 -->
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||||||
|
|
|
@ -109,18 +109,18 @@ def com_google_protobuf():
|
||||||
# This statement defines the @com_google_protobuf repo.
|
# This statement defines the @com_google_protobuf repo.
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "com_google_protobuf",
|
name = "com_google_protobuf",
|
||||||
sha256 = "b37e96e81842af659605908a421960a5dc809acbc888f6b947bc320f8628e5b1",
|
sha256 = "f6042eef01551cee4c663a11c3f429c06360a1f51daa9f4772bf3f13d24cde1f",
|
||||||
strip_prefix = "protobuf-3.12.0",
|
strip_prefix = "protobuf-3.17.2",
|
||||||
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.12.0.zip"],
|
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.2.zip"],
|
||||||
)
|
)
|
||||||
|
|
||||||
def com_google_protobuf_javalite():
|
def com_google_protobuf_javalite():
|
||||||
# java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite
|
# java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "com_google_protobuf_javalite",
|
name = "com_google_protobuf_javalite",
|
||||||
sha256 = "b37e96e81842af659605908a421960a5dc809acbc888f6b947bc320f8628e5b1",
|
sha256 = "f6042eef01551cee4c663a11c3f429c06360a1f51daa9f4772bf3f13d24cde1f",
|
||||||
strip_prefix = "protobuf-3.12.0",
|
strip_prefix = "protobuf-3.17.2",
|
||||||
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.12.0.zip"],
|
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.2.zip"],
|
||||||
)
|
)
|
||||||
|
|
||||||
def io_grpc_grpc_proto():
|
def io_grpc_grpc_proto():
|
||||||
|
|
Loading…
Reference in New Issue