From cb338e8082fb2889cdb3053e7ec7fba1064a22b6 Mon Sep 17 00:00:00 2001 From: Prickett Date: Mon, 23 Mar 2020 20:49:31 -0400 Subject: [PATCH] Add Cocoapod Support for SwiftGRPC --- CGRPCZlib.podspec | 31 +++++++++++++++++++++++++++++++ Package.swift | 1 + gRPC-Swift.podspec | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 CGRPCZlib.podspec create mode 100644 gRPC-Swift.podspec diff --git a/CGRPCZlib.podspec b/CGRPCZlib.podspec new file mode 100644 index 000000000..d7aef08ad --- /dev/null +++ b/CGRPCZlib.podspec @@ -0,0 +1,31 @@ +# Copyright 2020, gRPC Authors. All rights reserved. +# 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. + +Pod::Spec.new do |s| + s.name = 'CGRPCZlib' + s.module_name = 'CGRPCZlib' + s.version = '1.0.0-alpha.11' + s.license = { :type => 'Apache 2.0', :file => 'LICENSE' } + + s.summary = 'Swift gRPC code generator plugin and runtime library' + s.homepage = 'https://www.grpc.io' + s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } + s.source = { :git => 'https://github.com/grpc/grpc-swift.git', :tag => s.version } + + s.swift_version = '5.0' + + s.ios.deployment_target = '10.0' + s.osx.deployment_target = '10.12' + s.tvos.deployment_target = '10.0' + + s.source_files = 'Sources/CGRPCZlib/**/*.{swift,c,h}' + + end \ No newline at end of file diff --git a/Package.swift b/Package.swift index 4285ad316..cd3193cb3 100644 --- a/Package.swift +++ b/Package.swift @@ -25,6 +25,7 @@ let package = Package( ], products: [ .library(name: "GRPC", targets: ["GRPC"]), + .library(name: "CGRPCZlib", targets: ["CGRPCZlib"]), .executable(name: "protoc-gen-grpc-swift", targets: ["protoc-gen-grpc-swift"]), ], dependencies: [ diff --git a/gRPC-Swift.podspec b/gRPC-Swift.podspec new file mode 100644 index 000000000..5af0f42d1 --- /dev/null +++ b/gRPC-Swift.podspec @@ -0,0 +1,41 @@ +# Copyright 2020, gRPC Authors. All rights reserved. +# 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. + +Pod::Spec.new do |s| + s.name = 'gRPC-Swift' + s.module_name = 'GRPC' + s.version = '1.0.0-alpha.11' + s.license = { :type => 'Apache 2.0', :file => 'LICENSE' } + + s.summary = 'Swift gRPC code generator plugin and runtime library' + s.homepage = 'https://www.grpc.io' + s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } + s.source = { :git => 'https://github.com/grpc/grpc-swift.git', :tag => s.version } + + s.swift_version = '5.0' + + s.ios.deployment_target = '10.0' + s.osx.deployment_target = '10.12' + s.tvos.deployment_target = '10.0' + + s.source_files = 'Sources/GRPC/**/*.{swift,c,h}' + + s.dependency 'CGRPCZlib', s.version.to_s + + s.dependency 'SwiftNIO', '~> 2.0' + s.dependency 'SwiftNIOHTTP2', '~> 1.0' + s.dependency 'SwiftNIOTLS', '~> 2.0' + s.dependency 'SwiftNIOSSL', '2.7.0' + s.dependency 'SwiftNIOTransportServices', '~> 1.0' + s.dependency 'SwiftProtobuf', '~> 1.8.0' + s.dependency 'Logging', '~> 1.0' + + end \ No newline at end of file