Imported Upstream version 1.27.0
[platform/upstream/grpc.git] / gRPC.podspec
1 # This file has been automatically generated from a template file.
2 # Please make modifications to `templates/gRPC.podspec.template`
3 # instead. This file can be regenerated from the template by running
4 # `tools/buildgen/generate_projects.sh`.
5
6 # Copyright 2015 gRPC authors.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #
12 #     http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19
20
21 Pod::Spec.new do |s|
22   s.name     = 'gRPC'
23   version = '1.27.0'
24   s.version  = version
25   s.summary  = 'gRPC client library for iOS/OSX'
26   s.homepage = 'https://grpc.io'
27   s.license  = 'Apache License, Version 2.0'
28   s.authors  = { 'The gRPC contributors' => 'grpc-packages@google.com' }
29
30   s.source = {
31     :git => 'https://github.com/grpc/grpc.git',
32     :tag => "v#{version}",
33   }
34
35   name = 'GRPCClient'
36   s.module_name = name
37   s.header_dir = name
38
39   s.default_subspec = 'Interface', 'GRPCCore', 'Interface-Legacy'
40
41   s.pod_target_xcconfig = {
42     # This is needed by all pods that depend on gRPC-RxLibrary:
43     'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
44     'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
45   }
46
47   s.ios.deployment_target = '7.0'
48   s.osx.deployment_target = '10.9'
49   s.tvos.deployment_target = '10.0'
50   s.watchos.deployment_target = '4.0'
51
52   s.subspec 'Interface-Legacy' do |ss|
53     ss.header_mappings_dir = 'src/objective-c/GRPCClient'
54
55     ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
56                              "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
57                              "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
58                              "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
59                              "src/objective-c/GRPCClient/GRPCCall+Tests.h",
60                              "src/objective-c/GRPCClient/GRPCCallLegacy.h",
61                              "src/objective-c/GRPCClient/GRPCTypes.h"
62
63     ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
64                       "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
65                       "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
66                       "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
67                       "src/objective-c/GRPCClient/GRPCCall+Tests.h",
68                       "src/objective-c/GRPCClient/GRPCCallLegacy.h",
69                       "src/objective-c/GRPCClient/GRPCTypes.h"
70     ss.dependency "gRPC-RxLibrary/Interface", version
71
72     ss.ios.deployment_target = '7.0'
73     ss.osx.deployment_target = '10.9'
74     ss.tvos.deployment_target = '10.0'
75     ss.watchos.deployment_target = '4.0'
76   end
77
78   s.subspec 'Interface' do |ss|
79     ss.header_mappings_dir = 'src/objective-c/GRPCClient'
80
81     ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall.h',
82                              'src/objective-c/GRPCClient/GRPCCall+Interceptor.h',
83                              'src/objective-c/GRPCClient/GRPCCallOptions.h',
84                              'src/objective-c/GRPCClient/GRPCInterceptor.h',
85                              'src/objective-c/GRPCClient/GRPCTransport.h',
86                              'src/objective-c/GRPCClient/GRPCDispatchable.h',
87                              'src/objective-c/GRPCClient/version.h'
88
89     ss.source_files = 'src/objective-c/GRPCClient/GRPCCall.h',
90                       'src/objective-c/GRPCClient/GRPCCall.m',
91                       'src/objective-c/GRPCClient/GRPCCall+Interceptor.h',
92                       'src/objective-c/GRPCClient/GRPCCall+Interceptor.m',
93                       'src/objective-c/GRPCClient/GRPCCallOptions.h',
94                       'src/objective-c/GRPCClient/GRPCCallOptions.m',
95                       'src/objective-c/GRPCClient/GRPCDispatchable.h',
96                       'src/objective-c/GRPCClient/GRPCInterceptor.h',
97                       'src/objective-c/GRPCClient/GRPCInterceptor.m',
98                       'src/objective-c/GRPCClient/GRPCTransport.h',
99                       'src/objective-c/GRPCClient/GRPCTransport.m',
100                       'src/objective-c/GRPCClient/internal/*.h',
101                       'src/objective-c/GRPCClient/private/GRPCTransport+Private.h',
102                       'src/objective-c/GRPCClient/private/GRPCTransport+Private.m',
103                       'src/objective-c/GRPCClient/version.h'
104
105     ss.dependency "#{s.name}/Interface-Legacy", version
106
107     ss.ios.deployment_target = '7.0'
108     ss.osx.deployment_target = '10.9'
109     ss.tvos.deployment_target = '10.0'
110     ss.watchos.deployment_target = '4.0'
111   end
112
113   s.subspec 'GRPCCore' do |ss|
114     ss.header_mappings_dir = 'src/objective-c/GRPCClient'
115
116     ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
117                              'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
118                              'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
119                              'src/objective-c/GRPCClient/GRPCCall+Tests.h',
120                              'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h'
121     ss.private_header_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.h'
122     ss.source_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.{h,m}',
123                       'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h',
124                       'src/objective-c/GRPCClient/GRPCCall+ChannelArg.m',
125                       'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
126                       'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.m',
127                       'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
128                       'src/objective-c/GRPCClient/GRPCCall+Cronet.m',
129                       'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
130                       'src/objective-c/GRPCClient/GRPCCall+OAuth2.m',
131                       'src/objective-c/GRPCClient/GRPCCall+Tests.h',
132                       'src/objective-c/GRPCClient/GRPCCall+Tests.m',
133                       'src/objective-c/GRPCClient/GRPCCallLegacy.m'
134
135     # Certificates, to be able to establish TLS connections:
136     ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
137
138     ss.dependency "#{s.name}/Interface-Legacy", version
139     ss.dependency "#{s.name}/Interface", version
140     ss.dependency 'gRPC-Core', version
141     ss.dependency 'gRPC-RxLibrary', version
142
143     ss.ios.deployment_target = '7.0'
144     ss.osx.deployment_target = '10.9'
145     ss.tvos.deployment_target = '10.0'
146     ss.watchos.deployment_target = '4.0'
147   end
148
149   s.subspec 'GRPCCoreCronet' do |ss|
150     ss.header_mappings_dir = 'src/objective-c/GRPCClient'
151
152     ss.source_files = 'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
153                       'src/objective-c/GRPCClient/GRPCCall+Cronet.m',
154                       'src/objective-c/GRPCClient/private/GRPCCore/GRPCCoreCronet/*.{h,m}'
155     ss.dependency "#{s.name}/GRPCCore", version
156     ss.dependency 'gRPC-Core/Cronet-Implementation', version
157     ss.dependency 'CronetFramework'
158
159     ss.ios.deployment_target = '8.0'
160   end
161
162   # CFStream is now default. Leaving this subspec only for compatibility purpose.
163   s.subspec 'CFStream' do |ss|
164     ss.dependency "#{s.name}/GRPCCore", version
165
166     ss.ios.deployment_target = '7.0'
167     ss.osx.deployment_target = '10.9'
168     ss.tvos.deployment_target = '10.0'
169     ss.watchos.deployment_target = '4.0'
170   end
171
172   s.subspec 'InternalTesting' do |ss|
173     ss.dependency "#{s.name}/GRPCCore", version
174     ss.public_header_files = 'src/objective-c/GRPCClient/internal_testing/*.h'
175     ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,m}'
176     ss.header_mappings_dir = 'src/objective-c/GRPCClient'
177
178     ss.ios.deployment_target = '7.0'
179     ss.osx.deployment_target = '10.9'
180     ss.tvos.deployment_target = '10.0'
181     ss.watchos.deployment_target = '4.0'
182   end
183 end