diff options
Diffstat (limited to 'src/objective-c/tests')
-rw-r--r-- | src/objective-c/tests/Podfile | 5 | ||||
-rw-r--r-- | src/objective-c/tests/RemoteTestClient/RemoteTest.podspec | 21 |
2 files changed, 17 insertions, 9 deletions
diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 168114da37..8bc23a5169 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -17,7 +17,8 @@ GRPC_LOCAL_SRC = '../../..' ).each do |target_name| target target_name do pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true - pod 'ProtoCompiler', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" + pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" + pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" pod 'gRPC', :path => GRPC_LOCAL_SRC @@ -66,7 +67,7 @@ post_install do |installer| end if target.name == 'gRPC-Core' target.build_configurations.each do |config| - # TODO(zyc) Remove this setting after the issue is resolved + # TODO(zyc): Remove this setting after the issue is resolved # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void # function" warning config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO' diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec index e705310370..7d84a5ae4d 100644 --- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec @@ -11,23 +11,30 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.9' # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients. + s.dependency "!ProtoCompiler-gRPCPlugin", "~> 0.14" + repo_root = '../../../..' - pods_root = "#{repo_root}/src/objective-c/tests/Pods" bin_dir = "#{repo_root}/bins/$CONFIG" - protoc = "#{pods_root}/ProtoCompiler/protoc" # "#{bin_dir}/protobuf/protoc" + protoc = "#{bin_dir}/protobuf/protoc" + well_known_types_dir = "#{repo_root}/third_party/protobuf/src" plugin = "#{bin_dir}/grpc_objective_c_plugin" + s.prepare_command = <<-CMD - #{protoc} --plugin=protoc-gen-grpc=#{plugin} --objc_out=. --grpc_out=. *.proto + #{protoc} \ + --plugin=protoc-gen-grpc=#{plugin} \ + --objc_out=. \ + --grpc_out=. \ + -I . \ + -I #{well_known_types_dir} \ + *.proto CMD - s.dependency "ProtoCompiler", "~> 3.0.0-beta-3.1" - s.subspec "Messages" do |ms| ms.source_files = "*.pbobjc.{h,m}" ms.header_mappings_dir = "." ms.requires_arc = false - ms.dependency "Protobuf", "~> 3.0.0-beta-3.1" + ms.dependency "Protobuf" # This is needed by all pods that depend on Protobuf: ms.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', @@ -38,7 +45,7 @@ Pod::Spec.new do |s| ss.source_files = "*.pbrpc.{h,m}" ss.header_mappings_dir = "." ss.requires_arc = true - ss.dependency "gRPC-ProtoRPC", "~> 0.14" + ss.dependency "gRPC-ProtoRPC" ss.dependency "#{s.name}/Messages" end end |