Build fix for Cocoapods release

pull/20280/head
Muxi Yan 5 years ago
parent b3b00ad858
commit 88cfae00be
  1. 4
      gRPC-Core.podspec
  2. 52
      gRPC.podspec
  3. 6
      src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
  4. 14
      src/objective-c/!ProtoCompiler.podspec
  5. 2
      src/objective-c/BoringSSL-GRPC.podspec
  6. 4
      templates/gRPC-Core.podspec.template
  7. 52
      templates/gRPC.podspec.template
  8. 6
      templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template
  9. 2
      templates/src/objective-c/BoringSSL-GRPC.podspec.template

@ -32,6 +32,7 @@ Pod::Spec.new do |s|
s.source = { s.source = {
:git => 'https://github.com/grpc/grpc.git', :git => 'https://github.com/grpc/grpc.git',
:tag => "v#{version}", :tag => "v#{version}",
:submodules => true,
} }
# gRPC podspecs depend on fix for https://github.com/CocoaPods/CocoaPods/issues/6024, # 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.header_mappings_dir = '.'
ss.libraries = 'z' ss.libraries = 'z'
ss.dependency "#{s.name}/Interface", version 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' 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', ss.source_files = 'src/core/lib/gpr/alloc.h',
'src/core/lib/gpr/arena.h', 'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h', 'src/core/lib/gpr/env.h',

@ -32,11 +32,6 @@ Pod::Spec.new do |s|
:tag => "v#{version}", :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' name = 'GRPCClient'
s.module_name = name s.module_name = name
s.header_dir = name s.header_dir = name
@ -49,25 +44,35 @@ Pod::Spec.new do |s|
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', '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| s.subspec 'Interface-Legacy' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient' ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = "GRPCClient/GRPCCall+ChannelArg.h", ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
"GRPCClient/GRPCCall+ChannelCredentials.h", "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
"GRPCClient/GRPCCall+Cronet.h", "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
"GRPCClient/GRPCCall+OAuth2.h", "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h", "src/objective-c/GRPCClient/GRPCCall+Tests.h",
"src/objective-c/GRPCClient/GRPCCallLegacy.h", "src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h" "src/objective-c/GRPCClient/GRPCTypes.h"
ss.source_files = "GRPCClient/GRPCCall+ChannelArg.h", ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
"GRPCClient/GRPCCall+ChannelCredentials.h", "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
"GRPCClient/GRPCCall+Cronet.h", "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
"GRPCClient/GRPCCall+OAuth2.h", "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h", "src/objective-c/GRPCClient/GRPCCall+Tests.h",
"src/objective-c/GRPCClient/GRPCCallLegacy.h", "src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h" "src/objective-c/GRPCClient/GRPCTypes.h"
ss.dependency "gRPC-RxLibrary/Interface", version 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 end
s.subspec 'Interface' do |ss| s.subspec 'Interface' do |ss|
@ -98,6 +103,11 @@ Pod::Spec.new do |s|
'src/objective-c/GRPCClient/version.h' 'src/objective-c/GRPCClient/version.h'
ss.dependency "#{s.name}/Interface-Legacy", version 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 end
s.subspec 'GRPCCore' do |ss| s.subspec 'GRPCCore' do |ss|
@ -131,6 +141,11 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Interface", version ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', 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 end
s.subspec 'GRPCCoreCronet' do |ss| s.subspec 'GRPCCoreCronet' do |ss|
@ -142,10 +157,17 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/GRPCCore", version ss.dependency "#{s.name}/GRPCCore", version
ss.dependency 'gRPC-Core/Cronet-Implementation', version ss.dependency 'gRPC-Core/Cronet-Implementation', version
ss.dependency 'CronetFramework' ss.dependency 'CronetFramework'
ss.ios.deployment_target = '8.0'
end end
# CFStream is now default. Leaving this subspec only for compatibility purpose. # CFStream is now default. Leaving this subspec only for compatibility purpose.
s.subspec 'CFStream' do |ss| s.subspec 'CFStream' do |ss|
ss.dependency "#{s.name}/GRPCCore", version 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
end end

@ -102,7 +102,7 @@ Pod::Spec.new do |s|
s.preserve_paths = plugin s.preserve_paths = plugin
# Restrict the protoc version to the one supported by this 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: # For the Protobuf dependency not to complain:
s.ios.deployment_target = '7.0' s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9' 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 # 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. # and, if absent, compile the plugin from the local sources.
s.prepare_command = <<-CMD 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 CMD
end end

@ -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 # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them. # before them.
s.name = '!ProtoCompiler' s.name = '!ProtoCompiler'
v = '3.8.0' v = '3.8.1'
s.version = v s.version = v
s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files' s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files'
s.description = <<-DESC s.description = <<-DESC
@ -99,7 +99,10 @@ Pod::Spec.new do |s|
repo = 'google/protobuf' repo = 'google/protobuf'
file = "protoc-#{v}-osx-x86_64.zip" file = "protoc-#{v}-osx-x86_64.zip"
s.source = { 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 # TODO(jcanizales): Add sha1 or sha256
# :sha1 => '??', # :sha1 => '??',
} }
@ -123,6 +126,11 @@ Pod::Spec.new do |s|
bazel = "#{repo_root}/tools/bazel" bazel = "#{repo_root}/tools/bazel"
s.prepare_command = <<-CMD 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 CMD
end end

@ -39,7 +39,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'BoringSSL-GRPC' s.name = 'BoringSSL-GRPC'
version = '0.0.3' version = '0.0.4'
s.version = version s.version = version
s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.'
# Adapted from the homepage: # Adapted from the homepage:

@ -85,6 +85,7 @@
s.source = { s.source = {
:git => 'https://github.com/grpc/grpc.git', :git => 'https://github.com/grpc/grpc.git',
:tag => "v#{version}", :tag => "v#{version}",
:submodules => true,
} }
# gRPC podspecs depend on fix for https://github.com/CocoaPods/CocoaPods/issues/6024, # gRPC podspecs depend on fix for https://github.com/CocoaPods/CocoaPods/issues/6024,
@ -171,10 +172,9 @@
ss.header_mappings_dir = '.' ss.header_mappings_dir = '.'
ss.libraries = 'z' ss.libraries = 'z'
ss.dependency "#{s.name}/Interface", version 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' 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.source_files = ${ruby_multiline_list(grpc_private_files(libs), 22)}
ss.private_header_files = ${ruby_multiline_list(grpc_private_headers(libs), 30)} ss.private_header_files = ${ruby_multiline_list(grpc_private_headers(libs), 30)}

@ -34,11 +34,6 @@
:tag => "v#{version}", :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' name = 'GRPCClient'
s.module_name = name s.module_name = name
s.header_dir = name s.header_dir = name
@ -51,25 +46,35 @@
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', '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| s.subspec 'Interface-Legacy' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient' ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = "GRPCClient/GRPCCall+ChannelArg.h", ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
"GRPCClient/GRPCCall+ChannelCredentials.h", "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
"GRPCClient/GRPCCall+Cronet.h", "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
"GRPCClient/GRPCCall+OAuth2.h", "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h", "src/objective-c/GRPCClient/GRPCCall+Tests.h",
"src/objective-c/GRPCClient/GRPCCallLegacy.h", "src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h" "src/objective-c/GRPCClient/GRPCTypes.h"
ss.source_files = "GRPCClient/GRPCCall+ChannelArg.h", ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
"GRPCClient/GRPCCall+ChannelCredentials.h", "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
"GRPCClient/GRPCCall+Cronet.h", "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
"GRPCClient/GRPCCall+OAuth2.h", "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h", "src/objective-c/GRPCClient/GRPCCall+Tests.h",
"src/objective-c/GRPCClient/GRPCCallLegacy.h", "src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h" "src/objective-c/GRPCClient/GRPCTypes.h"
ss.dependency "gRPC-RxLibrary/Interface", version 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 end
s.subspec 'Interface' do |ss| s.subspec 'Interface' do |ss|
@ -100,6 +105,11 @@
'src/objective-c/GRPCClient/version.h' 'src/objective-c/GRPCClient/version.h'
ss.dependency "#{s.name}/Interface-Legacy", version 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 end
s.subspec 'GRPCCore' do |ss| s.subspec 'GRPCCore' do |ss|
@ -133,6 +143,11 @@
ss.dependency "#{s.name}/Interface", version ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', 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 end
s.subspec 'GRPCCoreCronet' do |ss| s.subspec 'GRPCCoreCronet' do |ss|
@ -144,10 +159,17 @@
ss.dependency "#{s.name}/GRPCCore", version ss.dependency "#{s.name}/GRPCCore", version
ss.dependency 'gRPC-Core/Cronet-Implementation', version ss.dependency 'gRPC-Core/Cronet-Implementation', version
ss.dependency 'CronetFramework' ss.dependency 'CronetFramework'
ss.ios.deployment_target = '8.0'
end end
# CFStream is now default. Leaving this subspec only for compatibility purpose. # CFStream is now default. Leaving this subspec only for compatibility purpose.
s.subspec 'CFStream' do |ss| s.subspec 'CFStream' do |ss|
ss.dependency "#{s.name}/GRPCCore", version 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
end end

@ -104,7 +104,7 @@
s.preserve_paths = plugin s.preserve_paths = plugin
# Restrict the protoc version to the one supported by this 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: # For the Protobuf dependency not to complain:
s.ios.deployment_target = '7.0' s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9' 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 # 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. # and, if absent, compile the plugin from the local sources.
s.prepare_command = <<-CMD 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 CMD
end end

@ -44,7 +44,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'BoringSSL-GRPC' s.name = 'BoringSSL-GRPC'
version = '0.0.3' version = '0.0.4'
s.version = version s.version = version
s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.'
# Adapted from the homepage: # Adapted from the homepage:

Loading…
Cancel
Save