aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/src
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2018-08-13 15:15:33 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2018-08-13 15:15:33 +0200
commit4c75c245b7b07083abdb33dbde074f2b6eacaafb (patch)
tree3ef444b811edf44f1d9670df506d87703c568068 /templates/src
parent5f4dfaac9e8ad175cbd5ef074b08f087cc17a610 (diff)
parente495476b1e31023637259883aa735fcc716c6adc (diff)
Merge remote-tracking branch 'upstream/master' into package-grpc-tools
Diffstat (limited to 'templates/src')
-rwxr-xr-xtemplates/src/csharp/Grpc.Core/Version.csproj.include.template2
-rwxr-xr-xtemplates/src/csharp/build_packages_dotnetcli.bat.template8
-rwxr-xr-xtemplates/src/csharp/build_packages_dotnetcli.sh.template54
-rwxr-xr-xtemplates/src/csharp/build_unitypackage.bat.template82
-rw-r--r--templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template2
-rw-r--r--templates/src/php/composer.json.template2
6 files changed, 86 insertions, 64 deletions
diff --git a/templates/src/csharp/Grpc.Core/Version.csproj.include.template b/templates/src/csharp/Grpc.Core/Version.csproj.include.template
index 398b198dbd..0ec0a08c49 100755
--- a/templates/src/csharp/Grpc.Core/Version.csproj.include.template
+++ b/templates/src/csharp/Grpc.Core/Version.csproj.include.template
@@ -4,6 +4,6 @@
<Project>
<PropertyGroup>
<GrpcCsharpVersion>${settings.csharp_version}</GrpcCsharpVersion>
- <GoogleProtobufVersion>3.5.1</GoogleProtobufVersion>
+ <GoogleProtobufVersion>3.6.1</GoogleProtobufVersion>
</PropertyGroup>
</Project>
diff --git a/templates/src/csharp/build_packages_dotnetcli.bat.template b/templates/src/csharp/build_packages_dotnetcli.bat.template
index cdadbba44f..877899c7bd 100755
--- a/templates/src/csharp/build_packages_dotnetcli.bat.template
+++ b/templates/src/csharp/build_packages_dotnetcli.bat.template
@@ -23,18 +23,12 @@
mkdir ..\..\artifacts
- @rem Collect the artifacts built by the previous build step if running on Jenkins
+ @rem Collect the artifacts built by the previous build step
mkdir nativelibs
- @rem Jenkins flow (deprecated)
- powershell -Command "cp -r ..\..\platform=*\artifacts\csharp_ext_* nativelibs"
- @rem Kokoro flow
powershell -Command "cp -r ..\..\input_artifacts\csharp_ext_* nativelibs"
@rem Collect protoc artifacts built by the previous build step
mkdir protoc_plugins
- @rem Jenkins flow (deprecated)
- powershell -Command "cp -r ..\..\platform=*\artifacts\protoc_* protoc_plugins"
- @rem Kokoro flow
powershell -Command "cp -r ..\..\input_artifacts\protoc_* protoc_plugins"
%%DOTNET% restore Grpc.sln || goto :error
diff --git a/templates/src/csharp/build_packages_dotnetcli.sh.template b/templates/src/csharp/build_packages_dotnetcli.sh.template
deleted file mode 100755
index 5eba62efab..0000000000
--- a/templates/src/csharp/build_packages_dotnetcli.sh.template
+++ /dev/null
@@ -1,54 +0,0 @@
-%YAML 1.2
---- |
- #!/bin/bash
- # Copyright 2016 gRPC authors.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
- set -ex
-
- cd $(dirname $0)
-
- mkdir -p ../../artifacts/
-
- # Collect the artifacts built by the previous build step
- mkdir -p nativelibs
- # Jenkins flow (deprecated)
- cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/csharp_ext_* nativelibs || true
- # Kokoro flow
- cp -r $EXTERNAL_GIT_ROOT/input_artifacts/csharp_ext_* nativelibs || true
-
- # Collect protoc artifacts built by the previous build step
- mkdir -p protoc_plugins
- # Jenkins flow (deprecated)
- cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/protoc_* protoc_plugins || true
- # Kokoro flow
- cp -r $EXTERNAL_GIT_ROOT/input_artifacts/protoc_* protoc_plugins || true
-
- dotnet restore Grpc.sln
-
- # To be able to build, we also need to put grpc_csharp_ext to its normal location
- mkdir -p ../../libs/opt
- cp nativelibs/csharp_ext_linux_x64/libgrpc_csharp_ext.so ../../libs/opt
-
- dotnet pack --configuration Release Grpc.Core --output ../../../artifacts
- dotnet pack --configuration Release Grpc.Core.Testing --output ../../../artifacts
- dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts
- dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts
- dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts
- dotnet pack --configuration Release Grpc.Tools --output ../../../artifacts
-
- nuget pack Grpc.nuspec -Version "${settings.csharp_version}" -OutputDirectory ../../artifacts
- nuget pack Grpc.Core.NativeDebug.nuspec -Version "${settings.csharp_version}" -OutputDirectory ../../artifacts
-
- (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)
diff --git a/templates/src/csharp/build_unitypackage.bat.template b/templates/src/csharp/build_unitypackage.bat.template
new file mode 100755
index 0000000000..76ec10dbd9
--- /dev/null
+++ b/templates/src/csharp/build_unitypackage.bat.template
@@ -0,0 +1,82 @@
+%YAML 1.2
+--- |
+ @rem Copyright 2018 The gRPC Authors
+ @rem
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
+ @rem you may not use this file except in compliance with the License.
+ @rem You may obtain a copy of the License at
+ @rem
+ @rem http://www.apache.org/licenses/LICENSE-2.0
+ @rem
+ @rem Unless required by applicable law or agreed to in writing, software
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ @rem See the License for the specific language governing permissions and
+ @rem limitations under the License.
+
+ @rem Current package versions
+ set VERSION=${settings.csharp_version}
+
+ @rem Adjust the location of nuget.exe
+ set NUGET=C:\nuget\nuget.exe
+ set DOTNET=dotnet
+
+ mkdir ..\..\artifacts
+
+ @rem Collect the artifacts built by the previous build step
+ mkdir nativelibs
+ powershell -Command "cp -r ..\..\input_artifacts\csharp_ext_* nativelibs"
+
+ @rem Collect protoc artifacts built by the previous build step
+ mkdir protoc_plugins
+ powershell -Command "cp -r ..\..\input_artifacts\protoc_* protoc_plugins"
+
+ %%DOTNET% restore Grpc.sln || goto :error
+
+ @rem To be able to build, we also need to put grpc_csharp_ext to its normal location
+ xcopy /Y /I nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release${"\\"}
+
+ %%DOTNET% build --configuration Release Grpc.Core || goto :error
+ @rem build HealthCheck to get hold of Google.Protobuf.dll assembly
+ %%DOTNET% build --configuration Release Grpc.HealthCheck || goto :error
+
+ @rem copy Grpc assemblies to the unity package skeleton
+ @rem TODO(jtattermusch): Add Grpc.Auth assembly and its dependencies
+ copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.dll || goto :error
+ copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.pdb unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.pdb || goto :error
+ copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.xml unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.xml || goto :error
+
+ @rem copy desktop native libraries to the unity package skeleton
+ copy /Y nativelibs\csharp_ext_linux_x86\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\linux\x86\libgrpc_csharp_ext.so || goto :error
+ copy /Y nativelibs\csharp_ext_linux_x64\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\linux\x64\libgrpc_csharp_ext.so || goto :error
+ copy /Y nativelibs\csharp_ext_macos_x86\libgrpc_csharp_ext.dylib unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\osx\x86\grpc_csharp_ext.bundle || goto :error
+ copy /Y nativelibs\csharp_ext_macos_x64\libgrpc_csharp_ext.dylib unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\osx\x64\grpc_csharp_ext.bundle || goto :error
+ copy /Y nativelibs\csharp_ext_windows_x86\grpc_csharp_ext.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\win\x86\grpc_csharp_ext.dll || goto :error
+ copy /Y nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\win\x64\grpc_csharp_ext.dll || goto :error
+
+ @rem add Android and iOS native libraries
+ copy /Y nativelibs\csharp_ext_linux_android_armeabi-v7a\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\armeabi-v7a\libgrpc_csharp_ext.so || goto :error
+ copy /Y nativelibs\csharp_ext_linux_android_arm64-v8a\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\arm64-v8a\libgrpc_csharp_ext.so || goto :error
+ copy /Y nativelibs\csharp_ext_linux_android_x86\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\x86\libgrpc_csharp_ext.so || goto :error
+ copy /Y nativelibs\csharp_ext_macos_ios\libgrpc_csharp_ext.a unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\ios\libgrpc_csharp_ext.a || goto :error
+ copy /Y nativelibs\csharp_ext_macos_ios\libgrpc.a unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\ios\libgrpc.a || goto :error
+
+ @rem add gRPC dependencies
+ @rem TODO(jtattermusch): also include XMLdoc
+ copy /Y Grpc.Core\bin\Release\net45\System.Interactive.Async.dll unitypackage\unitypackage_skeleton\Plugins\System.Interactive.Async\lib\net45\System.Interactive.Async.dll || goto :error
+
+ @rem add Google.Protobuf
+ @rem TODO(jtattermusch): also include XMLdoc
+ copy /Y Grpc.HealthCheck\bin\Release\net45\Google.Protobuf.dll unitypackage\unitypackage_skeleton\Plugins\Google.Protobuf\lib\net45\Google.Protobuf.dll || goto :error
+
+ @rem create a zipfile that will act as a Unity package
+ cd unitypackage\unitypackage_skeleton
+ zip -r ..\..\grpc_unity_package.zip Plugins
+ cd ..\..
+ copy /Y grpc_unity_package.zip ..\..\artifacts\grpc_unity_package.%VERSION%.zip || goto :error
+
+ goto :EOF
+
+ :error
+ echo Failed!
+ exit /b %errorlevel%
diff --git a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template
index 5c1358f7c3..30b6c5684c 100644
--- a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template
+++ b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template
@@ -103,7 +103,7 @@
s.preserve_paths = plugin
# Restrict the protoc version to the one supported by this plugin.
- s.dependency '!ProtoCompiler', '3.5.0'
+ s.dependency '!ProtoCompiler', '3.6.0'
# For the Protobuf dependency not to complain:
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
diff --git a/templates/src/php/composer.json.template b/templates/src/php/composer.json.template
index d647997113..3793634a2f 100644
--- a/templates/src/php/composer.json.template
+++ b/templates/src/php/composer.json.template
@@ -10,7 +10,7 @@
"google/protobuf": "^v3.3.0"
},
"require-dev": {
- "google/auth": "v0.9"
+ "google/auth": "^v1.3.0"
},
"autoload": {
"psr-4": {