From c38611a230e43023c63abd9cf45fcaed5eb28a89 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Mon, 24 Oct 2016 14:59:24 -0700 Subject: [PATCH] Bump protobuf to 3.1.0 Also removed warnings about protoc version matching runtime, since this is no longer supposed to be a problem (starting with 3.0.0-beta-4) and all our tests ran fine when using protoc 3.0.2 with protobuf runtime 3.1.0. Fixes #2316 --- .travis.yml | 2 +- COMPILING.md | 10 +++++----- README.md | 12 ++---------- android-interop-testing/app/build.gradle | 2 +- build.gradle | 2 +- buildscripts/make_dependencies.bat | 2 +- compiler/Dockerfile | 2 +- examples/android/helloworld/app/build.gradle | 2 +- examples/android/routeguide/app/build.gradle | 2 +- examples/build.gradle | 5 +---- examples/pom.xml | 7 +------ 11 files changed, 16 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e4bf1574a..7381954e68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ language: java env: global: - GRADLE_OPTS=-Xmx512m - - PROTOBUF_VERSION=3.0.2 + - PROTOBUF_VERSION=3.1.0 - LDFLAGS=-L/tmp/protobuf/lib - CXXFLAGS=-I/tmp/protobuf/include - LD_LIBRARY_PATH=/tmp/protobuf/lib diff --git a/COMPILING.md b/COMPILING.md index 10935a8b35..a197b68a56 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -33,7 +33,7 @@ For Linux, Mac and MinGW: ``` $ git clone https://github.com/google/protobuf.git $ cd protobuf -$ git checkout v3.0.2 +$ git checkout v3.1.0 $ ./autogen.sh $ ./configure $ make @@ -72,16 +72,16 @@ When building on Windows and VC++, you need to specify project properties for Gradle to find protobuf: ``` .\gradlew install ^ - -PvcProtobufInclude=C:\path\to\protobuf-3.0.2\src ^ - -PvcProtobufLibs=C:\path\to\protobuf-3.0.2\vsprojects\Release ^ + -PvcProtobufInclude=C:\path\to\protobuf-3.1.0\src ^ + -PvcProtobufLibs=C:\path\to\protobuf-3.1.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.0.2\\src -vcProtobufLibs=C:\\path\\to\\protobuf-3.0.2\\vsprojects\\Release +vcProtobufInclude=C:\\path\\to\\protobuf-3.1.0\\src +vcProtobufLibs=C:\\path\\to\\protobuf-3.1.0\\vsprojects\\Release targetArch=x86_32 ``` diff --git a/README.md b/README.md index 5bc9cc67f7..7fa1b31216 100644 --- a/README.md +++ b/README.md @@ -82,12 +82,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use protobuf-maven-plugin 0.5.0 - - com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier} grpc-java io.grpc:protoc-gen-grpc-java:1.0.1:exe:${os.detected.classifier} @@ -125,10 +120,7 @@ buildscript { protobuf { protoc { - // The version of protoc must match protobuf-java. If you don't depend on - // protobuf-java directly, you will be transitively depending on the - // protobuf-java version that grpc depends on. - artifact = "com.google.protobuf:protoc:3.0.2" + artifact = "com.google.protobuf:protoc:3.1.0" } plugins { grpc { diff --git a/android-interop-testing/app/build.gradle b/android-interop-testing/app/build.gradle index d2b177ecfa..9de66fd198 100644 --- a/android-interop-testing/app/build.gradle +++ b/android-interop-testing/app/build.gradle @@ -28,7 +28,7 @@ android { protobuf { protoc { - artifact = 'com.google.protobuf:protoc:3.0.2' + artifact = 'com.google.protobuf:protoc:3.1.0' } plugins { grpc { diff --git a/build.gradle b/build.gradle index 90ae77f3b0..464335aad4 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,7 @@ subprojects { javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix" guavaVersion = '19.0' - protobufVersion = '3.0.2' + protobufVersion = '3.1.0' protobufNanoVersion = '3.0.0-alpha-5' configureProtoCompilation = { diff --git a/buildscripts/make_dependencies.bat b/buildscripts/make_dependencies.bat index 5a92ef3c55..3e4689fb83 100644 --- a/buildscripts/make_dependencies.bat +++ b/buildscripts/make_dependencies.bat @@ -4,7 +4,7 @@ REM 7za is in http://www.7-zip.org/a/7z1507-extra.7z REM Prerequisite: REM 7za.exe in current directory or PATH -set PROTOBUF_VER=3.0.2 +set PROTOBUF_VER=3.1.0 set CMAKE_NAME=cmake-3.3.2-win32-x86 if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" ( diff --git a/compiler/Dockerfile b/compiler/Dockerfile index 1aa40990e5..b04c0c3dde 100644 --- a/compiler/Dockerfile +++ b/compiler/Dockerfile @@ -2,7 +2,7 @@ FROM protoc-artifacts:latest RUN scl enable devtoolset-1.1 'bash -c "cd /protobuf && \ git fetch && \ - git checkout v3.0.2 && \ + git checkout v3.10 && \ ./autogen.sh && \ CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 && \ make clean && make -j$(nproc) && make -j$(nproc) install"' diff --git a/examples/android/helloworld/app/build.gradle b/examples/android/helloworld/app/build.gradle index 6d05b9bc98..3f2c924b97 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.0.2' + artifact = 'com.google.protobuf:protoc:3.1.0' } plugins { javalite { diff --git a/examples/android/routeguide/app/build.gradle b/examples/android/routeguide/app/build.gradle index a4ae271d35..2f7810ffbe 100644 --- a/examples/android/routeguide/app/build.gradle +++ b/examples/android/routeguide/app/build.gradle @@ -25,7 +25,7 @@ android { protobuf { protoc { - artifact = 'com.google.protobuf:protoc:3.0.2' + artifact = 'com.google.protobuf:protoc:3.1.0' } plugins { javalite { diff --git a/examples/build.gradle b/examples/build.gradle index 2d6110d412..2daf7e3590 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -32,10 +32,7 @@ dependencies { protobuf { protoc { - // The version of protoc must match protobuf-java. If you don't depend on - // protobuf-java directly, you will be transitively depending on the - // protobuf-java version that grpc depends on. - artifact = 'com.google.protobuf:protoc:3.0.2' + artifact = 'com.google.protobuf:protoc:3.1.0' } plugins { grpc { diff --git a/examples/pom.xml b/examples/pom.xml index 2ccb671b69..35d61bc3ec 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -43,12 +43,7 @@ protobuf-maven-plugin 0.5.0 - - com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier} grpc-java io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}