Skip to content

Commit

Permalink
Bump protobuf to 3.1.0
Browse files Browse the repository at this point in the history
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 grpc#2316
  • Loading branch information
ejona86 committed Nov 1, 2016
1 parent 483662e commit c38611a
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ``<project-root>\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
```

Expand Down
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<configuration>
<!--
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.
-->
<protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.1:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion android-interop-testing/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/make_dependencies.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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\" (
Expand Down
2 changes: 1 addition & 1 deletion compiler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
Expand Down
2 changes: 1 addition & 1 deletion examples/android/helloworld/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion examples/android/routeguide/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 1 addition & 4 deletions examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 1 addition & 6 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<configuration>
<!--
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.
-->
<protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
Expand Down

0 comments on commit c38611a

Please sign in to comment.