diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index ec0b84d84a1..da18f800006 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..57230e6329c 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -107,7 +107,12 @@ Pod::Spec.new do |s| s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' s.tvos.deployment_target = '10.0' - s.watchos.deployment_target = '4.0' + + # watchOS is disabled due to #20258. + # TODO (mxyan): Enable watchos when !ProtoCompiler.podspec is updated for + # support of watchos in the next release + # s.watchos.deployment_target = '4.0' + # Restrict the gRPC runtime version to the one supported by this plugin. s.dependency 'gRPC-ProtoRPC', v @@ -116,6 +121,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..a3e49f64795 100644 --- a/src/objective-c/!ProtoCompiler.podspec +++ b/src/objective-c/!ProtoCompiler.podspec @@ -123,6 +123,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..85a4ab07a87 100644 --- a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template +++ b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template @@ -109,7 +109,12 @@ s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' s.tvos.deployment_target = '10.0' - s.watchos.deployment_target = '4.0' + + # watchOS is disabled due to #20258. + # TODO (mxyan): Enable watchos when !ProtoCompiler.podspec is updated for + # support of watchos in the next release + # s.watchos.deployment_target = '4.0' + # Restrict the gRPC runtime version to the one supported by this plugin. s.dependency 'gRPC-ProtoRPC', v @@ -118,6 +123,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: diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index a57efb95fe6..a99eb6cc86e 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1132,17 +1132,19 @@ class ObjCLanguage(object): 'EXAMPLE_PATH': 'src/objective-c/examples/tvOS-sample', 'FRAMEWORKS': 'NO' })) - out.append( - self.config.job_spec( - ['src/objective-c/tests/build_one_example_bazel.sh'], - timeout_seconds=20 * 60, - shortname='ios-buildtest-example-watchOS-sample', - cpu_cost=1e6, - environ={ - 'SCHEME': 'watchOS-sample-WatchKit-App', - 'EXAMPLE_PATH': 'src/objective-c/examples/watchOS-sample', - 'FRAMEWORKS': 'NO' - })) + # Disabled due to #20258 + # TODO (mxyan): Reenable this test when #20258 is resolved. + # out.append( + # self.config.job_spec( + # ['src/objective-c/tests/build_one_example_bazel.sh'], + # timeout_seconds=20 * 60, + # shortname='ios-buildtest-example-watchOS-sample', + # cpu_cost=1e6, + # environ={ + # 'SCHEME': 'watchOS-sample-WatchKit-App', + # 'EXAMPLE_PATH': 'src/objective-c/examples/watchOS-sample', + # 'FRAMEWORKS': 'NO' + # })) out.append( self.config.job_spec( ['src/objective-c/tests/run_plugin_tests.sh'],