Build system reorg

pull/19704/head
Muxi Yan 5 years ago
parent 1d038a8f29
commit f20cfd3844
  1. 18
      gRPC-ProtoRPC.podspec
  2. 23
      gRPC.podspec
  3. 2
      src/objective-c/ProtoRPC/ProtoRPCLegacy.m
  4. 18
      templates/gRPC-ProtoRPC.podspec.template
  5. 23
      templates/gRPC.podspec.template

@ -41,13 +41,18 @@ Pod::Spec.new do |s|
s.module_name = name
s.header_dir = name
src_dir = 'src/objective-c/ProtoRPC'
s.default_subspec = 'Main', 'Legacy', 'Legacy-Header'
s.default_subspec = 'Main', 'Legacy'
s.subspec 'Legacy-Header' do |ss|
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.public_header_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.h"
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.h"
end
s.subspec 'Main' do |ss|
ss.header_mappings_dir = "#{src_dir}"
ss.dependency 'gRPC', version
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.dependency "#{s.name}/Legacy-Header", version
ss.dependency 'gRPC/Interface', version
ss.dependency 'Protobuf', '~> 3.0'
ss.source_files = "src/objective-c/ProtoRPC/ProtoMethod.{h,m}",
@ -56,13 +61,14 @@ Pod::Spec.new do |s|
end
s.subspec 'Legacy' do |ss|
ss.header_mappings_dir = "#{src_dir}"
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.dependency "#{s.name}/Main", version
ss.dependency "#{s.name}/Legacy-Header", version
ss.dependency 'gRPC/GRPCCore', version
ss.dependency 'gRPC-RxLibrary', version
ss.dependency 'Protobuf', '~> 3.0'
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.{h,m}",
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.m",
"src/objective-c/ProtoRPC/ProtoServiceLegacy.{h,m}"
end

@ -42,15 +42,20 @@ Pod::Spec.new do |s|
s.default_subspec = 'Interface', 'GRPCCore'
# Certificates, to be able to establish TLS connections:
s.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
s.pod_target_xcconfig = {
# This is needed by all pods that depend on gRPC-RxLibrary:
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
}
s.subspec 'Interface-Legacy' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h"
ss.source_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h"
end
s.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
@ -75,6 +80,8 @@ Pod::Spec.new do |s|
'src/objective-c/GRPCClient/GRPCTransport.m',
'src/objective-c/GRPCClient/private/GRPCTransport+Private.h',
'src/objective-c/GRPCClient/private/GRPCTransport+Private.m'
ss.dependency "#{s.name}/Interface-Legacy", version
end
s.subspec 'GRPCCore' do |ss|
@ -84,7 +91,6 @@ Pod::Spec.new do |s|
'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/GRPCCall+ChannelArg.h',
'src/objective-c/GRPCClient/internal_testing/*.h'
ss.private_header_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.h'
@ -100,11 +106,13 @@ Pod::Spec.new do |s|
'src/objective-c/GRPCClient/GRPCCall+OAuth2.m',
'src/objective-c/GRPCClient/GRPCCall+Tests.h',
'src/objective-c/GRPCClient/GRPCCall+Tests.m',
'src/objective-c/GRPCClient/GRPCCallLegacy.h',
'src/objective-c/GRPCClient/GRPCCallLegacy.m'
ss.dependency 'gRPC-Core', version
# Certificates, to be able to establish TLS connections:
ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', version
end
@ -114,8 +122,9 @@ Pod::Spec.new do |s|
ss.source_files = 'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
'src/objective-c/GRPCClient/GRPCCall+Cronet.m',
'src/objective-c/GRPCClient/private/GRPCCore/GRPCCoreCronet/*.{h,m}'
ss.dependency 'CronetFramework'
ss.dependency "#{s.name}/GRPCCore", version
ss.dependency 'gRPC-Core/Cronet-Implementation', version
ss.dependency 'CronetFramework'
end
# CFStream is now default. Leaving this subspec only for compatibility purpose.

@ -1,5 +1,7 @@
#import "ProtoRPCLegacy.h"
#import "ProtoMethod.h"
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers.h>
#else

@ -43,13 +43,18 @@
s.module_name = name
s.header_dir = name
src_dir = 'src/objective-c/ProtoRPC'
s.default_subspec = 'Main', 'Legacy', 'Legacy-Header'
s.default_subspec = 'Main', 'Legacy'
s.subspec 'Legacy-Header' do |ss|
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.public_header_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.h"
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.h"
end
s.subspec 'Main' do |ss|
ss.header_mappings_dir = "#{src_dir}"
ss.dependency 'gRPC', version
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.dependency "#{s.name}/Legacy-Header", version
ss.dependency 'gRPC/Interface', version
ss.dependency 'Protobuf', '~> 3.0'
ss.source_files = "src/objective-c/ProtoRPC/ProtoMethod.{h,m}",
@ -58,13 +63,14 @@
end
s.subspec 'Legacy' do |ss|
ss.header_mappings_dir = "#{src_dir}"
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.dependency "#{s.name}/Main", version
ss.dependency "#{s.name}/Legacy-Header", version
ss.dependency 'gRPC/GRPCCore', version
ss.dependency 'gRPC-RxLibrary', version
ss.dependency 'Protobuf', '~> 3.0'
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.{h,m}",
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.m",
"src/objective-c/ProtoRPC/ProtoServiceLegacy.{h,m}"
end

@ -44,15 +44,20 @@
s.default_subspec = 'Interface', 'GRPCCore'
# Certificates, to be able to establish TLS connections:
s.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
s.pod_target_xcconfig = {
# This is needed by all pods that depend on gRPC-RxLibrary:
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
}
s.subspec 'Interface-Legacy' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h"
ss.source_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h"
end
s.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
@ -77,6 +82,8 @@
'src/objective-c/GRPCClient/GRPCTransport.m',
'src/objective-c/GRPCClient/private/GRPCTransport+Private.h',
'src/objective-c/GRPCClient/private/GRPCTransport+Private.m'
ss.dependency "#{s.name}/Interface-Legacy", version
end
s.subspec 'GRPCCore' do |ss|
@ -86,7 +93,6 @@
'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/GRPCCall+ChannelArg.h',
'src/objective-c/GRPCClient/internal_testing/*.h'
ss.private_header_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.h'
@ -102,11 +108,13 @@
'src/objective-c/GRPCClient/GRPCCall+OAuth2.m',
'src/objective-c/GRPCClient/GRPCCall+Tests.h',
'src/objective-c/GRPCClient/GRPCCall+Tests.m',
'src/objective-c/GRPCClient/GRPCCallLegacy.h',
'src/objective-c/GRPCClient/GRPCCallLegacy.m'
ss.dependency 'gRPC-Core', version
# Certificates, to be able to establish TLS connections:
ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', version
end
@ -116,8 +124,9 @@
ss.source_files = 'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
'src/objective-c/GRPCClient/GRPCCall+Cronet.m',
'src/objective-c/GRPCClient/private/GRPCCore/GRPCCoreCronet/*.{h,m}'
ss.dependency 'CronetFramework'
ss.dependency "#{s.name}/GRPCCore", version
ss.dependency 'gRPC-Core/Cronet-Implementation', version
ss.dependency 'CronetFramework'
end
# CFStream is now default. Leaving this subspec only for compatibility purpose.

Loading…
Cancel
Save