diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 7c2877f6edc..6c664a8e722 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -32,6 +32,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => "v#{version}", + :submodules => true, } # gRPC podspecs depend on fix for https://github.com/CocoaPods/CocoaPods/issues/6024, @@ -184,10 +185,9 @@ Pod::Spec.new do |s| ss.header_mappings_dir = '.' ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version - ss.dependency 'BoringSSL-GRPC', '0.0.3' + ss.dependency 'BoringSSL-GRPC', '0.0.4' ss.compiler_flags = '-DGRPC_SHADOW_BORINGSSL_SYMBOLS' - # To save you from scrolling, this is the last part of the podspec. ss.source_files = 'src/core/lib/gpr/alloc.h', 'src/core/lib/gpr/arena.h', 'src/core/lib/gpr/env.h', diff --git a/gRPC.podspec b/gRPC.podspec index 1b36c5ed2ea..e104f2f513c 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -32,11 +32,6 @@ Pod::Spec.new do |s| :tag => "v#{version}", } - s.ios.deployment_target = '7.0' - s.osx.deployment_target = '10.9' - s.tvos.deployment_target = '10.0' - s.watchos.deployment_target = '4.0' - name = 'GRPCClient' s.module_name = name s.header_dir = name @@ -49,25 +44,35 @@ Pod::Spec.new do |s| 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } + s.ios.deployment_target = '7.0' + s.osx.deployment_target = '10.9' + s.tvos.deployment_target = '10.0' + s.watchos.deployment_target = '4.0' + s.subspec 'Interface-Legacy' do |ss| ss.header_mappings_dir = 'src/objective-c/GRPCClient' - ss.public_header_files = "GRPCClient/GRPCCall+ChannelArg.h", - "GRPCClient/GRPCCall+ChannelCredentials.h", - "GRPCClient/GRPCCall+Cronet.h", - "GRPCClient/GRPCCall+OAuth2.h", - "GRPCClient/GRPCCall+Tests.h", + ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h", + "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h", + "src/objective-c/GRPCClient/GRPCCall+Cronet.h", + "src/objective-c/GRPCClient/GRPCCall+OAuth2.h", + "src/objective-c/GRPCClient/GRPCCall+Tests.h", "src/objective-c/GRPCClient/GRPCCallLegacy.h", "src/objective-c/GRPCClient/GRPCTypes.h" - ss.source_files = "GRPCClient/GRPCCall+ChannelArg.h", - "GRPCClient/GRPCCall+ChannelCredentials.h", - "GRPCClient/GRPCCall+Cronet.h", - "GRPCClient/GRPCCall+OAuth2.h", - "GRPCClient/GRPCCall+Tests.h", + ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h", + "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h", + "src/objective-c/GRPCClient/GRPCCall+Cronet.h", + "src/objective-c/GRPCClient/GRPCCall+OAuth2.h", + "src/objective-c/GRPCClient/GRPCCall+Tests.h", "src/objective-c/GRPCClient/GRPCCallLegacy.h", "src/objective-c/GRPCClient/GRPCTypes.h" ss.dependency "gRPC-RxLibrary/Interface", version + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' end s.subspec 'Interface' do |ss| @@ -98,6 +103,11 @@ Pod::Spec.new do |s| 'src/objective-c/GRPCClient/version.h' ss.dependency "#{s.name}/Interface-Legacy", version + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' end s.subspec 'GRPCCore' do |ss| @@ -131,6 +141,11 @@ Pod::Spec.new do |s| ss.dependency "#{s.name}/Interface", version ss.dependency 'gRPC-Core', version ss.dependency 'gRPC-RxLibrary', version + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' end s.subspec 'GRPCCoreCronet' do |ss| @@ -142,10 +157,17 @@ Pod::Spec.new do |s| ss.dependency "#{s.name}/GRPCCore", version ss.dependency 'gRPC-Core/Cronet-Implementation', version ss.dependency 'CronetFramework' + + ss.ios.deployment_target = '8.0' end # CFStream is now default. Leaving this subspec only for compatibility purpose. s.subspec 'CFStream' do |ss| ss.dependency "#{s.name}/GRPCCore", version + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' end end diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 30a07f1647d..d38d8ca91ef 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -102,7 +102,7 @@ Pod::Spec.new do |s| s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.8.0' + s.dependency '!ProtoCompiler', '3.8.1' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' @@ -116,6 +116,8 @@ Pod::Spec.new do |s| # present in this pod's directory. We use that knowledge to check for the existence of the file # and, if absent, compile the plugin from the local sources. s.prepare_command = <<-CMD - #{bazel} build //src/compiler:grpc_objective_c_plugin + if [ ! -f #{plugin} ]; then + #{bazel} build //src/compiler:grpc_objective_c_plugin + fi CMD end diff --git a/src/objective-c/!ProtoCompiler.podspec b/src/objective-c/!ProtoCompiler.podspec index 9d036ac0b5b..3d872c8c9cf 100644 --- a/src/objective-c/!ProtoCompiler.podspec +++ b/src/objective-c/!ProtoCompiler.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler' - v = '3.8.0' + v = '3.8.1' s.version = v s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files' s.description = <<-DESC @@ -99,7 +99,10 @@ Pod::Spec.new do |s| repo = 'google/protobuf' file = "protoc-#{v}-osx-x86_64.zip" s.source = { - :http => "https://github.com/#{repo}/releases/download/v#{v}/#{file}", + # TODO (mxyan): Restore the next line upon next minor version update + # :http => "https://github.com/#{repo}/releases/download/v#{v}/#{file}", + :http => "https://github.com/#{repo}/releases/download/v3.8.0/protoc-3.8.0-osx-x86_64.zip", + # TODO(jcanizales): Add sha1 or sha256 # :sha1 => '??', } @@ -123,6 +126,11 @@ Pod::Spec.new do |s| bazel = "#{repo_root}/tools/bazel" s.prepare_command = <<-CMD - #{bazel} build @com_google_protobuf//:protoc + if [ ! -f bin/protoc ]; then + #{bazel} build @com_google_protobuf//:protoc + else + mv bin/protoc . + mv include/google . + fi CMD end diff --git a/src/objective-c/BoringSSL-GRPC.podspec b/src/objective-c/BoringSSL-GRPC.podspec index f0d9750d6d1..78cd20f3958 100644 --- a/src/objective-c/BoringSSL-GRPC.podspec +++ b/src/objective-c/BoringSSL-GRPC.podspec @@ -39,7 +39,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.3' + version = '0.0.4' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 9b77723a854..36b08794b81 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -85,6 +85,7 @@ s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => "v#{version}", + :submodules => true, } # gRPC podspecs depend on fix for https://github.com/CocoaPods/CocoaPods/issues/6024, @@ -171,10 +172,9 @@ ss.header_mappings_dir = '.' ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version - ss.dependency 'BoringSSL-GRPC', '0.0.3' + ss.dependency 'BoringSSL-GRPC', '0.0.4' ss.compiler_flags = '-DGRPC_SHADOW_BORINGSSL_SYMBOLS' - # To save you from scrolling, this is the last part of the podspec. ss.source_files = ${ruby_multiline_list(grpc_private_files(libs), 22)} ss.private_header_files = ${ruby_multiline_list(grpc_private_headers(libs), 30)} diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index e705edc1748..e8afdb14062 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -34,11 +34,6 @@ :tag => "v#{version}", } - s.ios.deployment_target = '7.0' - s.osx.deployment_target = '10.9' - s.tvos.deployment_target = '10.0' - s.watchos.deployment_target = '4.0' - name = 'GRPCClient' s.module_name = name s.header_dir = name @@ -51,25 +46,35 @@ 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } + s.ios.deployment_target = '7.0' + s.osx.deployment_target = '10.9' + s.tvos.deployment_target = '10.0' + s.watchos.deployment_target = '4.0' + s.subspec 'Interface-Legacy' do |ss| ss.header_mappings_dir = 'src/objective-c/GRPCClient' - ss.public_header_files = "GRPCClient/GRPCCall+ChannelArg.h", - "GRPCClient/GRPCCall+ChannelCredentials.h", - "GRPCClient/GRPCCall+Cronet.h", - "GRPCClient/GRPCCall+OAuth2.h", - "GRPCClient/GRPCCall+Tests.h", + ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h", + "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h", + "src/objective-c/GRPCClient/GRPCCall+Cronet.h", + "src/objective-c/GRPCClient/GRPCCall+OAuth2.h", + "src/objective-c/GRPCClient/GRPCCall+Tests.h", "src/objective-c/GRPCClient/GRPCCallLegacy.h", "src/objective-c/GRPCClient/GRPCTypes.h" - ss.source_files = "GRPCClient/GRPCCall+ChannelArg.h", - "GRPCClient/GRPCCall+ChannelCredentials.h", - "GRPCClient/GRPCCall+Cronet.h", - "GRPCClient/GRPCCall+OAuth2.h", - "GRPCClient/GRPCCall+Tests.h", + ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h", + "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h", + "src/objective-c/GRPCClient/GRPCCall+Cronet.h", + "src/objective-c/GRPCClient/GRPCCall+OAuth2.h", + "src/objective-c/GRPCClient/GRPCCall+Tests.h", "src/objective-c/GRPCClient/GRPCCallLegacy.h", "src/objective-c/GRPCClient/GRPCTypes.h" ss.dependency "gRPC-RxLibrary/Interface", version + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' end s.subspec 'Interface' do |ss| @@ -100,6 +105,11 @@ 'src/objective-c/GRPCClient/version.h' ss.dependency "#{s.name}/Interface-Legacy", version + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' end s.subspec 'GRPCCore' do |ss| @@ -133,6 +143,11 @@ ss.dependency "#{s.name}/Interface", version ss.dependency 'gRPC-Core', version ss.dependency 'gRPC-RxLibrary', version + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' end s.subspec 'GRPCCoreCronet' do |ss| @@ -144,10 +159,17 @@ ss.dependency "#{s.name}/GRPCCore", version ss.dependency 'gRPC-Core/Cronet-Implementation', version ss.dependency 'CronetFramework' + + ss.ios.deployment_target = '8.0' end # CFStream is now default. Leaving this subspec only for compatibility purpose. s.subspec 'CFStream' do |ss| ss.dependency "#{s.name}/GRPCCore", version + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' end end diff --git a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template index 6286e3369e2..9dddfa9f06b 100644 --- a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template +++ b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template @@ -104,7 +104,7 @@ s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.8.0' + s.dependency '!ProtoCompiler', '3.8.1' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' @@ -118,6 +118,8 @@ # present in this pod's directory. We use that knowledge to check for the existence of the file # and, if absent, compile the plugin from the local sources. s.prepare_command = <<-CMD - #{bazel} build //src/compiler:grpc_objective_c_plugin + if [ ! -f #{plugin} ]; then + #{bazel} build //src/compiler:grpc_objective_c_plugin + fi CMD end diff --git a/templates/src/objective-c/BoringSSL-GRPC.podspec.template b/templates/src/objective-c/BoringSSL-GRPC.podspec.template index 3d2736e3307..462283286b6 100644 --- a/templates/src/objective-c/BoringSSL-GRPC.podspec.template +++ b/templates/src/objective-c/BoringSSL-GRPC.podspec.template @@ -44,7 +44,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.3' + version = '0.0.4' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: