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