From 0d6546719a34323545610fc4442c5265fa4b272f Mon Sep 17 00:00:00 2001 From: ZHANG Dapeng Date: Wed, 20 May 2020 16:30:59 -0700 Subject: [PATCH] all: bump protobuf to 3.12.0 Version 3.12.0 is needed for the feature of support for proto3 field presence #7051 --- COMPILING.md | 10 +++++----- build.gradle | 2 +- buildscripts/build_docker.sh | 4 ++-- buildscripts/make_dependencies.bat | 2 +- buildscripts/make_dependencies.sh | 2 +- examples/android/clientcache/app/build.gradle | 2 +- examples/android/helloworld/app/build.gradle | 2 +- examples/android/routeguide/app/build.gradle | 2 +- examples/android/strictmode/app/build.gradle | 2 +- examples/build.gradle | 2 +- examples/example-alts/build.gradle | 2 +- examples/example-gauth/build.gradle | 2 +- examples/example-gauth/pom.xml | 12 ++++++------ examples/example-hostname/build.gradle | 2 +- examples/example-hostname/pom.xml | 2 +- examples/example-jwt-auth/build.gradle | 2 +- examples/example-jwt-auth/pom.xml | 4 ++-- examples/example-tls/build.gradle | 2 +- examples/example-tls/pom.xml | 2 +- examples/pom.xml | 14 +++++++------- repositories.bzl | 12 ++++++------ 21 files changed, 43 insertions(+), 43 deletions(-) diff --git a/COMPILING.md b/COMPILING.md index 46fe15c2d4a..02e55292c3b 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -47,7 +47,7 @@ The codegen plugin is C++ code and requires protobuf 3.0.0 or later. For Linux, Mac and MinGW: ``` -$ PROTOBUF_VERSION=3.11.0 +$ PROTOBUF_VERSION=3.12.0 $ 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 $ 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: ``` .\gradlew publishToMavenLocal ^ - -PvcProtobufInclude=C:\path\to\protobuf-3.11.0\src ^ - -PvcProtobufLibs=C:\path\to\protobuf-3.11.0\vsprojects\Release ^ + -PvcProtobufInclude=C:\path\to\protobuf-3.12.0\src ^ + -PvcProtobufLibs=C:\path\to\protobuf-3.12.0\vsprojects\Release ^ -PtargetArch=x86_32 ``` Since specifying those properties every build is bothersome, you can instead create ``\gradle.properties`` with contents like: ``` -vcProtobufInclude=C:\\path\\to\\protobuf-3.11.0\\src -vcProtobufLibs=C:\\path\\to\\protobuf-3.11.0\\vsprojects\\Release +vcProtobufInclude=C:\\path\\to\\protobuf-3.12.0\\src +vcProtobufLibs=C:\\path\\to\\protobuf-3.12.0\\vsprojects\\Release targetArch=x86_32 ``` diff --git a/build.gradle b/build.gradle index f97ce5b9aa0..c699b7d595e 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ subprojects { nettyVersion = '4.1.48.Final' guavaVersion = '28.2-android' googleauthVersion = '0.20.0' - protobufVersion = '3.11.0' + protobufVersion = '3.12.0' protocVersion = protobufVersion opencensusVersion = '0.24.0' diff --git a/buildscripts/build_docker.sh b/buildscripts/build_docker.sh index 6c405519571..7ba8b6e6973 100755 --- a/buildscripts/build_docker.sh +++ b/buildscripts/build_docker.sh @@ -2,7 +2,7 @@ set -eu -o pipefail readonly proto_dir="$(mktemp -d --tmpdir protobuf.XXXXXX)" -wget -O - https://github.com/google/protobuf/archive/v3.11.0.tar.gz | tar xz -C "$proto_dir" +wget -O - https://github.com/google/protobuf/archive/v3.12.0.tar.gz | tar xz -C "$proto_dir" -docker build -t protoc-artifacts "$proto_dir"/protobuf-3.11.0/protoc-artifacts +docker build -t protoc-artifacts "$proto_dir"/protobuf-3.12.0/protoc-artifacts rm -r "$proto_dir" diff --git a/buildscripts/make_dependencies.bat b/buildscripts/make_dependencies.bat index 7c13d8159f3..c9ff2a63a43 100644 --- a/buildscripts/make_dependencies.bat +++ b/buildscripts/make_dependencies.bat @@ -1,4 +1,4 @@ -set PROTOBUF_VER=3.11.0 +set PROTOBUF_VER=3.12.0 set CMAKE_NAME=cmake-3.3.2-win32-x86 if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" ( diff --git a/buildscripts/make_dependencies.sh b/buildscripts/make_dependencies.sh index 92ef9d7f72d..d6332f303d6 100755 --- a/buildscripts/make_dependencies.sh +++ b/buildscripts/make_dependencies.sh @@ -3,7 +3,7 @@ # Build protoc set -evux -o pipefail -PROTOBUF_VERSION=3.11.0 +PROTOBUF_VERSION=3.12.0 # ARCH is x86_64 bit unless otherwise specified. ARCH="${ARCH:-x86_64}" diff --git a/examples/android/clientcache/app/build.gradle b/examples/android/clientcache/app/build.gradle index 81401f33acb..9ca462d909c 100644 --- a/examples/android/clientcache/app/build.gradle +++ b/examples/android/clientcache/app/build.gradle @@ -28,7 +28,7 @@ android { } protobuf { - protoc { artifact = 'com.google.protobuf:protoc:3.11.0' } + protoc { artifact = 'com.google.protobuf:protoc:3.12.0' } plugins { grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION } diff --git a/examples/android/helloworld/app/build.gradle b/examples/android/helloworld/app/build.gradle index 5ec43e476fd..e8209b9dca4 100644 --- a/examples/android/helloworld/app/build.gradle +++ b/examples/android/helloworld/app/build.gradle @@ -27,7 +27,7 @@ android { } protobuf { - protoc { artifact = 'com.google.protobuf:protoc:3.11.0' } + protoc { artifact = 'com.google.protobuf:protoc:3.12.0' } plugins { grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION } diff --git a/examples/android/routeguide/app/build.gradle b/examples/android/routeguide/app/build.gradle index aa8b8e33c18..76982b8c949 100644 --- a/examples/android/routeguide/app/build.gradle +++ b/examples/android/routeguide/app/build.gradle @@ -26,7 +26,7 @@ android { } protobuf { - protoc { artifact = 'com.google.protobuf:protoc:3.11.0' } + protoc { artifact = 'com.google.protobuf:protoc:3.12.0' } plugins { grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION } diff --git a/examples/android/strictmode/app/build.gradle b/examples/android/strictmode/app/build.gradle index f070cc93287..5b1084d534d 100644 --- a/examples/android/strictmode/app/build.gradle +++ b/examples/android/strictmode/app/build.gradle @@ -27,7 +27,7 @@ android { } protobuf { - protoc { artifact = 'com.google.protobuf:protoc:3.11.0' } + protoc { artifact = 'com.google.protobuf:protoc:3.12.0' } plugins { grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION } diff --git a/examples/build.gradle b/examples/build.gradle index e92723d0d3e..9af9adb28b8 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -23,7 +23,7 @@ targetCompatibility = 1.7 // Feel free to delete the comment at the next line. It is just for safely // updating the version in our release process. def grpcVersion = '1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION -def protobufVersion = '3.11.0' +def protobufVersion = '3.12.0' def protocVersion = protobufVersion dependencies { diff --git a/examples/example-alts/build.gradle b/examples/example-alts/build.gradle index 0c7f9f436cf..be96ba33479 100644 --- a/examples/example-alts/build.gradle +++ b/examples/example-alts/build.gradle @@ -24,7 +24,7 @@ targetCompatibility = 1.7 // Feel free to delete the comment at the next line. It is just for safely // updating the version in our release process. def grpcVersion = '1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION -def protocVersion = '3.11.0' +def protocVersion = '3.12.0' dependencies { // grpc-alts transitively depends on grpc-netty-shaded, grpc-protobuf, and grpc-stub diff --git a/examples/example-gauth/build.gradle b/examples/example-gauth/build.gradle index 93de59633f9..1680c460f88 100644 --- a/examples/example-gauth/build.gradle +++ b/examples/example-gauth/build.gradle @@ -24,7 +24,7 @@ targetCompatibility = 1.7 // Feel free to delete the comment at the next line. It is just for safely // updating the version in our release process. def grpcVersion = '1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION -def protobufVersion = '3.11.0' +def protobufVersion = '3.12.0' def protocVersion = protobufVersion diff --git a/examples/example-gauth/pom.xml b/examples/example-gauth/pom.xml index 3344bf80ec9..4072a98d714 100644 --- a/examples/example-gauth/pom.xml +++ b/examples/example-gauth/pom.xml @@ -13,7 +13,7 @@ UTF-8 1.31.0-SNAPSHOT - 3.11.0 + 3.12.0 1.7 1.7 @@ -32,6 +32,11 @@ + + com.google.protobuf + protobuf-java-util + ${protobuf.version} + io.grpc grpc-netty-shaded @@ -60,11 +65,6 @@ grpc-testing test - - com.google.protobuf - protobuf-java-util - ${protobuf.version} - com.google.auth google-auth-library-oauth2-http diff --git a/examples/example-hostname/build.gradle b/examples/example-hostname/build.gradle index e3abf6e3055..4591067a0f4 100644 --- a/examples/example-hostname/build.gradle +++ b/examples/example-hostname/build.gradle @@ -22,7 +22,7 @@ targetCompatibility = 1.7 // Feel free to delete the comment at the next line. It is just for safely // updating the version in our release process. def grpcVersion = '1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION -def protobufVersion = '3.11.0' +def protobufVersion = '3.12.0' dependencies { implementation "io.grpc:grpc-protobuf:${grpcVersion}" diff --git a/examples/example-hostname/pom.xml b/examples/example-hostname/pom.xml index df158414cff..9c27bfc500d 100644 --- a/examples/example-hostname/pom.xml +++ b/examples/example-hostname/pom.xml @@ -13,7 +13,7 @@ UTF-8 1.31.0-SNAPSHOT - 3.11.0 + 3.12.0 1.7 1.7 diff --git a/examples/example-jwt-auth/build.gradle b/examples/example-jwt-auth/build.gradle index 1dc1a505ab6..975c7ddd51c 100644 --- a/examples/example-jwt-auth/build.gradle +++ b/examples/example-jwt-auth/build.gradle @@ -23,7 +23,7 @@ targetCompatibility = 1.7 // Feel free to delete the comment at the next line. It is just for safely // updating the version in our release process. def grpcVersion = '1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION -def protobufVersion = '3.11.0' +def protobufVersion = '3.12.0' def protocVersion = protobufVersion dependencies { diff --git a/examples/example-jwt-auth/pom.xml b/examples/example-jwt-auth/pom.xml index 977a3263d49..00127d3a6c4 100644 --- a/examples/example-jwt-auth/pom.xml +++ b/examples/example-jwt-auth/pom.xml @@ -14,8 +14,8 @@ UTF-8 1.31.0-SNAPSHOT - 3.11.0 - 3.11.0 + 3.12.0 + 3.12.0 1.7 1.7 diff --git a/examples/example-tls/build.gradle b/examples/example-tls/build.gradle index 3e0608ade7d..571ea5315c6 100644 --- a/examples/example-tls/build.gradle +++ b/examples/example-tls/build.gradle @@ -25,7 +25,7 @@ targetCompatibility = 1.7 // updating the version in our release process. def grpcVersion = '1.31.0-SNAPSHOT' // CURRENT_GRPC_VERSION def nettyTcNativeVersion = '2.0.30.Final' -def protocVersion = '3.11.0' +def protocVersion = '3.12.0' dependencies { implementation "io.grpc:grpc-netty:${grpcVersion}" diff --git a/examples/example-tls/pom.xml b/examples/example-tls/pom.xml index f00ad35c239..cca6c711827 100644 --- a/examples/example-tls/pom.xml +++ b/examples/example-tls/pom.xml @@ -13,7 +13,7 @@ UTF-8 1.31.0-SNAPSHOT - 3.11.0 + 3.12.0 2.0.30.Final 1.7 diff --git a/examples/pom.xml b/examples/pom.xml index 18b35057a87..f55466332bd 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -13,8 +13,8 @@ UTF-8 1.31.0-SNAPSHOT - 3.11.0 - 3.11.0 + 3.12.0 + 3.12.0 1.7 1.7 @@ -33,6 +33,11 @@ + + com.google.protobuf + protobuf-java-util + ${protobuf.version} + io.grpc grpc-netty-shaded @@ -57,11 +62,6 @@ grpc-testing test - - com.google.protobuf - protobuf-java-util - ${protobuf.version} - com.google.errorprone error_prone_annotations diff --git a/repositories.bzl b/repositories.bzl index fe77877c8c0..7e714c194ba 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -267,18 +267,18 @@ def com_google_protobuf(): # This statement defines the @com_google_protobuf repo. http_archive( name = "com_google_protobuf", - sha256 = "60d2012e3922e429294d3a4ac31f336016514a91e5a63fd33f35743ccfe1bd7d", - strip_prefix = "protobuf-3.11.0", - urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.11.0.zip"], + sha256 = "b37e96e81842af659605908a421960a5dc809acbc888f6b947bc320f8628e5b1", + strip_prefix = "protobuf-3.12.0", + urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.12.0.zip"], ) def com_google_protobuf_javalite(): # java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite http_archive( name = "com_google_protobuf_javalite", - sha256 = "e60211a40473f6be95b53f64559f82a3b2971672b11710db2fc9081708e25699", - strip_prefix = "protobuf-0425fa932ce95a32bb9f88b2c09b995e9ff8207b", - urls = ["https://github.com/google/protobuf/archive/0425fa932ce95a32bb9f88b2c09b995e9ff8207b.zip"], # Commit with fixed javalite on 3.11.x branch + sha256 = "b37e96e81842af659605908a421960a5dc809acbc888f6b947bc320f8628e5b1", + strip_prefix = "protobuf-3.12.0", + urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.12.0.zip"], ) def com_google_truth_truth():