xref: /aosp_15_r20/external/grpc-grpc/templates/gRPC-ProtoRPC.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
5  # `templates/gRPC-ProtoRPC.podspec.template` instead. This file can be
6  # regenerated from the template by running
7  # `tools/buildgen/generate_projects.sh`.
8
9  # Copyright 2015 gRPC authors.
10  #
11  # Licensed under the Apache License, Version 2.0 (the "License");
12  # you may not use this file except in compliance with the License.
13  # You may obtain a copy of the License at
14  #
15  #     http://www.apache.org/licenses/LICENSE-2.0
16  #
17  # Unless required by applicable law or agreed to in writing, software
18  # distributed under the License is distributed on an "AS IS" BASIS,
19  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  # See the License for the specific language governing permissions and
21  # limitations under the License.
22
23
24  Pod::Spec.new do |s|
25    s.name     = 'gRPC-ProtoRPC'
26    version = '${settings.version}'
27    s.version  = version
28    s.summary  = 'RPC library for Protocol Buffers, based on gRPC'
29    s.homepage = 'https://grpc.io'
30    s.license  = 'Apache License, Version 2.0'
31    s.authors  = { 'The gRPC contributors' => '[email protected]' }
32
33    s.source = {
34      :git => 'https://github.com/grpc/grpc.git',
35      :tag => "v#{version}",
36    }
37
38    s.ios.deployment_target = '10.0'
39    s.osx.deployment_target = '10.12'
40    s.tvos.deployment_target = '12.0'
41    s.watchos.deployment_target = '6.0'
42
43    name = 'ProtoRPC'
44    s.module_name = name
45    s.header_dir = name
46
47    s.default_subspec = 'Main', 'Legacy', 'Legacy-Header'
48
49    s.subspec 'Legacy-Header' do |ss|
50      ss.header_mappings_dir = "src/objective-c/ProtoRPC"
51      ss.public_header_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.h"
52      ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.h"
53    end
54
55    s.subspec 'Main' do |ss|
56      ss.header_mappings_dir = "src/objective-c/ProtoRPC"
57      ss.dependency "#{s.name}/Legacy-Header", version
58      ss.dependency 'gRPC/Interface', version
59      ss.dependency 'Protobuf', '~> 3.0'
60
61      ss.source_files = "src/objective-c/ProtoRPC/ProtoMethod.{h,m}",
62                        "src/objective-c/ProtoRPC/ProtoRPC.{h,m}",
63                        "src/objective-c/ProtoRPC/ProtoService.{h,m}"
64    end
65
66    s.subspec 'Legacy' do |ss|
67      ss.header_mappings_dir = "src/objective-c/ProtoRPC"
68      ss.dependency "#{s.name}/Main", version
69      ss.dependency "#{s.name}/Legacy-Header", version
70      ss.dependency 'gRPC/GRPCCore', version
71      ss.dependency 'gRPC-RxLibrary', version
72      ss.dependency 'Protobuf', '~> 3.0'
73
74      ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.m",
75                        "src/objective-c/ProtoRPC/ProtoServiceLegacy.m"
76    end
77
78    # CFStream is now default. Leaving this subspec only for compatibility purpose.
79    s.subspec 'CFStream' do |ss|
80      ss.dependency "#{s.name}/Legacy", version
81    end
82
83    s.pod_target_xcconfig = {
84      # This is needed by all pods that depend on Protobuf:
85      'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
86      # This is needed by all pods that depend on gRPC-RxLibrary:
87      'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
88      'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
89      'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
90    }
91  end
92