Skip to content

Commit

Permalink
Upgrade to protobuf-3.0.0-beta-2 and protobuf-nano-3.0.0-alpha-5
Browse files Browse the repository at this point in the history
Update option name that disables protobuf tests.
  • Loading branch information
zhangkun83 committed Jan 28, 2016
1 parent b7c4e18 commit e2ed2e8
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ language: java

env:
global:
- PROTOBUF_VERSION=3.0.0-beta-1
- PROTOBUF_VERSION=3.0.0-beta-2
- OPENSSL_VERSION=1.0.2d
- LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib
- CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include
Expand Down
12 changes: 6 additions & 6 deletions COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-beta-1.
The codegen plugin is C++ code and requires protobuf 3.0.0-beta-2.

For Linux, Mac and MinGW:
```
$ git clone https://github.com/google/protobuf.git
$ cd protobuf
$ git checkout v3.0.0-beta-1
$ git checkout v3.0.0-beta-2
$ ./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.0-beta-1\src ^
-PvcProtobufLibs=C:\path\to\protobuf-3.0.0-beta-1\vsprojects\Release ^
-PvcProtobufInclude=C:\path\to\protobuf-3.0.0-beta-2\src ^
-PvcProtobufLibs=C:\path\to\protobuf-3.0.0-beta-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-beta-1\\src
vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-beta-1\\vsprojects\\Release
vcProtobufInclude=C:\\path\\to\\protobuf-3.0.0-beta-2\\src
vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-beta-2\\vsprojects\\Release
targetArch=x86_32
```

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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.
-->
<protocArtifact>com.google.protobuf:protoc:3.0.0-beta-1:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:3.0.0-beta-2:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:0.9.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
Expand Down Expand Up @@ -129,7 +129,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-beta-1"
artifact = "com.google.protobuf:protoc:3.0.0-beta-2"
}
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.0-beta-1'
artifact = 'com.google.protobuf:protoc:3.0.0-beta-2'
}
plugins {
grpc {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ subprojects {
protocPluginBaseName = 'protoc-gen-grpc-java'
javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix"

protobufVersion = '3.0.0-beta-1'
protobufNanoVersion = '3.0.0-alpha-4'
protobufVersion = '3.0.0-beta-2'
protobufNanoVersion = '3.0.0-alpha-5'

configureProtoCompilation = {
String generatedSourcePath = "${projectDir}/src/generated"
Expand Down
4 changes: 2 additions & 2 deletions buildscripts/jenkins-pre.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ cd "%WORKSPACE%"
set ESCWORKSPACE=%WORKSPACE:\=\\%

echo targetArch=x86_32> gradle.properties
echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-1\\cmake\\build\\Release>> gradle.properties
echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-1\\cmake\\build\\include>> gradle.properties
echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-2\\cmake\\build\\Release>> gradle.properties
echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-2\\cmake\\build\\include>> gradle.properties
6 changes: 3 additions & 3 deletions buildscripts/make_dependencies.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ REM Prerequisite:
REM 7za.exe in current directory or PATH
REM Install http://slproweb.com/download/Win64OpenSSL_Light-1_0_2d.exe

set PROTOBUF_VER=3.0.0-beta-1
set PROTOBUF_VER=3.0.0-beta-2
set CMAKE_NAME=cmake-3.3.2-win32-x86

if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" (
Expand All @@ -26,10 +26,10 @@ 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-beta-1\cmake
pushd protobuf-3.0.0-beta-2\cmake
mkdir build
cd build
cmake -DBUILD_TESTING=OFF ..
cmake -Dprotobuf_BUILD_TESTS=OFF ..
msbuild /maxcpucount /p:Configuration=Release libprotoc.vcxproj
call extract_includes.bat
popd
Expand Down
5 changes: 5 additions & 0 deletions buildscripts/make_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ DOWNLOAD_DIR=/tmp/source
INSTALL_DIR=/tmp/protobuf-${PROTOBUF_VERSION}
mkdir -p $DOWNLOAD_DIR

# We may have set this elsewhere in order to allow gRPC find our custom
# built openssl to run ALPN, but it may be incompatible with wget which
# uses the system openssl. We unset this variable for this script.
export -n LD_LIBRARY_PATH

# Make protoc
# Can't check for presence of directory as cache auto-creates it.
if [ -f ${INSTALL_DIR}/bin/protoc ]; then
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.0-beta-1 && \
git checkout v3.0.0-beta-2 && \
./autogen.sh && \
CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 -j$(nproc) && \
make clean && make && make install"'
Expand Down
2 changes: 1 addition & 1 deletion compiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build your own codegen.

* Linux, Mac OS X with Clang, or Windows with MSYS2
* Java 7 or up
* [Protobuf](https://github.com/google/protobuf) 3.0.0-beta-1 or up
* [Protobuf](https://github.com/google/protobuf) 3.0.0-beta-2 or up

## Compiling and testing the codegen
Change to the `compiler` directory:
Expand Down
2 changes: 1 addition & 1 deletion examples/android/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.0-beta-1'
artifact = 'com.google.protobuf:protoc:3.0.0-beta-2'
}
plugins {
grpc {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions grpclb/src/generated/main/java/io/grpc/grpclb/Server.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e2ed2e8

Please sign in to comment.