diff --git a/.travis.yml b/.travis.yml index 219dd74c441..2e4bf1574aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ language: java env: global: - GRADLE_OPTS=-Xmx512m - - PROTOBUF_VERSION=3.0.0 + - PROTOBUF_VERSION=3.0.2 - 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 497adb711f5..10935a8b350 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -27,13 +27,13 @@ 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. ### Build Protobuf -The codegen plugin is C++ code and requires protobuf 3.0.0. +The codegen plugin is C++ code and requires protobuf 3.0.0 or later. For Linux, Mac and MinGW: ``` $ git clone https://github.com/google/protobuf.git $ cd protobuf -$ git checkout v3.0.0 +$ git checkout v3.0.2 $ ./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.0\src ^ - -PvcProtobufLibs=C:\path\to\protobuf-3.0.0\vsprojects\Release ^ + -PvcProtobufInclude=C:\path\to\protobuf-3.0.2\src ^ + -PvcProtobufLibs=C:\path\to\protobuf-3.0.2\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.0\\src -vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0\\vsprojects\\Release +vcProtobufInclude=C:\\path\\to\\protobuf-3.0.2\\src +vcProtobufLibs=C:\\path\\to\\protobuf-3.0.2\\vsprojects\\Release targetArch=x86_32 ``` diff --git a/README.md b/README.md index c68dbb75470..3b8c133b644 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use protobuf-java directly, you will be transitively depending on the protobuf-java version that grpc depends on. --> - com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier} grpc-java io.grpc:protoc-gen-grpc-java:1.0.0:exe:${os.detected.classifier} @@ -128,7 +128,7 @@ protobuf { // 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.0" + artifact = "com.google.protobuf:protoc:3.0.2" } plugins { grpc { diff --git a/android-interop-testing/app/build.gradle b/android-interop-testing/app/build.gradle index 355f35d8dff..d2b177ecfad 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.0' + artifact = 'com.google.protobuf:protoc:3.0.2' } plugins { grpc { diff --git a/build.gradle b/build.gradle index badb1c8d391..ce1b55d195d 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.0' + protobufVersion = '3.0.2' protobufNanoVersion = '3.0.0-alpha-5' configureProtoCompilation = { @@ -154,6 +154,8 @@ subprojects { protobuf: "com.google.protobuf:protobuf-java:${protobufVersion}", // swap to ${protobufVersion} after versions align again protobuf_lite: "com.google.protobuf:protobuf-lite:3.0.1", + // swap to ${protobufVersion} after versions align again + protoc_lite: "com.google.protobuf:protoc-gen-javalite:3.0.0", protobuf_nano: "com.google.protobuf.nano:protobuf-javanano:${protobufNanoVersion}", protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.8.0', protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}", diff --git a/buildscripts/jenkins-pre.bat b/buildscripts/jenkins-pre.bat index fafd37c63f0..07354b54f05 100644 --- a/buildscripts/jenkins-pre.bat +++ b/buildscripts/jenkins-pre.bat @@ -14,5 +14,5 @@ set ESCWORKSPACE=%WORKSPACE:\=\\% echo targetArch=x86_32> gradle.properties echo failOnWarnings=true>> gradle.properties -echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0\\cmake\\build\\Release>> gradle.properties -echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0\\cmake\\build\\include>> gradle.properties +echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-%PROTOBUF_VER%\\cmake\\build\\Release>> gradle.properties +echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-%PROTOBUF_VER%\\cmake\\build\\include>> gradle.properties diff --git a/buildscripts/make_dependencies.bat b/buildscripts/make_dependencies.bat index 2ab9214d672..5a92ef3c55e 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.0 +set PROTOBUF_VER=3.0.2 set CMAKE_NAME=cmake-3.3.2-win32-x86 if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" ( @@ -25,7 +25,7 @@ set PATH=%PATH%;%cd%\%CMAKE_NAME%\bin powershell -command "& { iwr https://github.com/google/protobuf/archive/v%PROTOBUF_VER%.zip -OutFile protobuf.zip }" 7za X protobuf.zip del protobuf.zip -pushd protobuf-3.0.0\cmake +pushd protobuf-%PROTOBUF_VER%\cmake mkdir build cd build cmake -Dprotobuf_BUILD_TESTS=OFF -G "Visual Studio %VisualStudioVersion:~0,2%" .. diff --git a/compiler/Dockerfile b/compiler/Dockerfile index ffc85a30c8d..1aa40990e51 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.0 && \ + git checkout v3.0.2 && \ ./autogen.sh && \ CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 && \ make clean && make -j$(nproc) && make -j$(nproc) install"' diff --git a/compiler/build.gradle b/compiler/build.gradle index 7e116d43d00..c0ffd4a4b89 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -163,7 +163,7 @@ protobuf { if (project.hasProperty('protoc-gen-javalite')) { path = project['protoc-gen-javalite'] } else { - artifact = "com.google.protobuf:protoc-gen-javalite:${protobufVersion}" + artifact = libraries.protoc_lite } } grpc { diff --git a/examples/android/helloworld/app/build.gradle b/examples/android/helloworld/app/build.gradle index 8a413428f7a..6d05b9bc981 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.0' + artifact = 'com.google.protobuf:protoc:3.0.2' } plugins { javalite { diff --git a/examples/android/routeguide/app/build.gradle b/examples/android/routeguide/app/build.gradle index 77a8c793430..a4ae271d351 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.0' + artifact = 'com.google.protobuf:protoc:3.0.2' } plugins { javalite { diff --git a/examples/build.gradle b/examples/build.gradle index 30d76d0ac43..2d6110d4123 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -35,7 +35,7 @@ protobuf { // 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.0' + artifact = 'com.google.protobuf:protoc:3.0.2' } plugins { grpc { diff --git a/examples/pom.xml b/examples/pom.xml index 2feac230ab5..2ccb671b697 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -48,7 +48,7 @@ protobuf-java directly, you will be transitively depending on the protobuf-java version that grpc depends on. --> - com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier} grpc-java io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier} diff --git a/protobuf-lite/build.gradle b/protobuf-lite/build.gradle index 7e3058b4ef2..eaf802b15b3 100644 --- a/protobuf-lite/build.gradle +++ b/protobuf-lite/build.gradle @@ -42,7 +42,7 @@ protobuf { if (project.hasProperty('protoc-gen-javalite')) { path = project['protoc-gen-javalite'] } else { - artifact = "com.google.protobuf:protoc-gen-javalite:${protobufVersion}" + artifact = libraries.protoc_lite } } }