mirror of https://github.com/grpc/grpc-java.git
Upgrade to protobuf-3.0.0-beta-2 and protobuf-nano-3.0.0-alpha-5
Update option name that disables protobuf tests.
This commit is contained in:
parent
b7c4e18dcd
commit
e2ed2e8f03
|
@ -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
|
||||
|
|
12
COMPILING.md
12
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-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
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -50,7 +50,7 @@ public final class ClientConfig extends
|
|||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
serverTargets_ = new com.google.protobuf.LazyStringArrayList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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\" (
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"'
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class HelloRequest extends
|
|||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
name_ = s;
|
||||
break;
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class HelloResponse extends
|
|||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
message_ = s;
|
||||
break;
|
||||
|
|
|
@ -48,7 +48,7 @@ public final class Feature extends
|
|||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
name_ = s;
|
||||
break;
|
||||
|
|
|
@ -60,7 +60,7 @@ public final class RouteNote extends
|
|||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
message_ = s;
|
||||
break;
|
||||
|
|
|
@ -43,7 +43,7 @@ public final class InitialLoadBalanceRequest extends
|
|||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
name_ = s;
|
||||
break;
|
||||
|
|
|
@ -42,7 +42,7 @@ public final class InitialLoadBalanceResponse extends
|
|||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
initialResponseTypeCase_ = 2;
|
||||
initialResponseType_ = s;
|
||||
break;
|
||||
|
|
|
@ -46,7 +46,7 @@ public final class Server extends
|
|||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
ipAddress_ = s;
|
||||
break;
|
||||
|
@ -57,7 +57,7 @@ public final class Server extends
|
|||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
loadBalanceToken_ = s;
|
||||
break;
|
||||
|
|
|
@ -1738,13 +1738,13 @@ public final class Messages {
|
|||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
username_ = s;
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
oauthScope_ = s;
|
||||
break;
|
||||
|
@ -2583,7 +2583,7 @@ public final class Messages {
|
|||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
value_ = s;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue