all: Bump protobuf to 3.0.2, to fix protoc in CI
protoc no longer builds in 3.0.0 because auto-download of the gmock zip
now fails. 3.0.2 has a fix to autogen:
https://github.com/google/protobuf/commit/bba446bbf2ac7b0b9923d4eb07d5acd0665a8cf0
All that was strictly necessary was to update .travis.yml and
buildscripts/, but it helps our sanity to keep the rest of the protobuf
versions in sync. Lite is left on its existing version, because it did
not see a bump of neither the java library nor the protoc plugin.
diff --git a/.travis.yml b/.travis.yml
index 219dd74..2e4bf15 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,7 @@
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 497adb7..10935a8 100644
--- a/COMPILING.md
+++ b/COMPILING.md
@@ -27,13 +27,13 @@
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 @@
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 ``<project-root>\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 c68dbb7..3b8c133 100644
--- a/README.md
+++ b/README.md
@@ -87,7 +87,7 @@
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
- <protocArtifact>com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}</protocArtifact>
+ <protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
@@ -128,7 +128,7 @@
// 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 355f35d..d2b177e 100644
--- a/android-interop-testing/app/build.gradle
+++ b/android-interop-testing/app/build.gradle
@@ -28,7 +28,7 @@
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 badb1c8..ce1b55d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -62,7 +62,7 @@
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 @@
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 fafd37c..07354b5 100644
--- a/buildscripts/jenkins-pre.bat
+++ b/buildscripts/jenkins-pre.bat
@@ -14,5 +14,5 @@
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 2ab9214..5a92ef3 100644
--- a/buildscripts/make_dependencies.bat
+++ b/buildscripts/make_dependencies.bat
@@ -4,7 +4,7 @@
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 @@
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 ffc85a3..1aa4099 100644
--- a/compiler/Dockerfile
+++ b/compiler/Dockerfile
@@ -2,7 +2,7 @@
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 7e116d4..c0ffd4a 100644
--- a/compiler/build.gradle
+++ b/compiler/build.gradle
@@ -163,7 +163,7 @@
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 8a41342..6d05b9b 100644
--- a/examples/android/helloworld/app/build.gradle
+++ b/examples/android/helloworld/app/build.gradle
@@ -27,7 +27,7 @@
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 77a8c79..a4ae271 100644
--- a/examples/android/routeguide/app/build.gradle
+++ b/examples/android/routeguide/app/build.gradle
@@ -25,7 +25,7 @@
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 30d76d0..2d6110d 100644
--- a/examples/build.gradle
+++ b/examples/build.gradle
@@ -35,7 +35,7 @@
// 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 2feac23..2ccb671 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.
-->
- <protocArtifact>com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}</protocArtifact>
+ <protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
diff --git a/protobuf-lite/build.gradle b/protobuf-lite/build.gradle
index 7e3058b..eaf802b 100644
--- a/protobuf-lite/build.gradle
+++ b/protobuf-lite/build.gradle
@@ -42,7 +42,7 @@
if (project.hasProperty('protoc-gen-javalite')) {
path = project['protoc-gen-javalite']
} else {
- artifact = "com.google.protobuf:protoc-gen-javalite:${protobufVersion}"
+ artifact = libraries.protoc_lite
}
}
}