xref: /aosp_15_r20/external/cronet/third_party/protobuf/Protobuf.podspec (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard Worker# This file describes to Cocoapods how to integrate the Objective-C runtime into a dependent
2*6777b538SAndroid Build Coastguard Worker# project.
3*6777b538SAndroid Build Coastguard Worker# Despite this file being specific to Objective-C, it needs to be on the root of the repository.
4*6777b538SAndroid Build Coastguard Worker# Otherwise, Cocoapods gives trouble like not picking up the license file correctly, or not letting
5*6777b538SAndroid Build Coastguard Worker# dependent projects use the :git notation to refer to the library.
6*6777b538SAndroid Build Coastguard WorkerPod::Spec.new do |s|
7*6777b538SAndroid Build Coastguard Worker  s.name     = 'Protobuf'
8*6777b538SAndroid Build Coastguard Worker  s.version  = '3.21.12'
9*6777b538SAndroid Build Coastguard Worker  s.summary  = 'Protocol Buffers v.3 runtime library for Objective-C.'
10*6777b538SAndroid Build Coastguard Worker  s.homepage = 'https://github.com/protocolbuffers/protobuf'
11*6777b538SAndroid Build Coastguard Worker  s.license  = 'BSD-3-Clause'
12*6777b538SAndroid Build Coastguard Worker  s.authors  = { 'The Protocol Buffers contributors' => '[email protected]' }
13*6777b538SAndroid Build Coastguard Worker  s.cocoapods_version = '>= 1.0'
14*6777b538SAndroid Build Coastguard Worker
15*6777b538SAndroid Build Coastguard Worker  s.source = { :git => 'https://github.com/protocolbuffers/protobuf.git',
16*6777b538SAndroid Build Coastguard Worker               :tag => "v#{s.version}" }
17*6777b538SAndroid Build Coastguard Worker
18*6777b538SAndroid Build Coastguard Worker  s.source_files = 'objectivec/*.{h,m}',
19*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/Any.pbobjc.h',
20*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/Api.pbobjc.h',
21*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/Duration.pbobjc.h',
22*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/Empty.pbobjc.h',
23*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/FieldMask.pbobjc.h',
24*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/SourceContext.pbobjc.h',
25*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/Struct.pbobjc.h',
26*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/Timestamp.pbobjc.h',
27*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/Type.pbobjc.h',
28*6777b538SAndroid Build Coastguard Worker                   'objectivec/google/protobuf/Wrappers.pbobjc.h'
29*6777b538SAndroid Build Coastguard Worker  # The following would cause duplicate symbol definitions. GPBProtocolBuffers is expected to be
30*6777b538SAndroid Build Coastguard Worker  # left out, as it's an umbrella implementation file.
31*6777b538SAndroid Build Coastguard Worker  s.exclude_files = 'objectivec/GPBProtocolBuffers.m'
32*6777b538SAndroid Build Coastguard Worker
33*6777b538SAndroid Build Coastguard Worker  # Set a CPP symbol so the code knows to use framework imports.
34*6777b538SAndroid Build Coastguard Worker  s.user_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' }
35*6777b538SAndroid Build Coastguard Worker  s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' }
36*6777b538SAndroid Build Coastguard Worker
37*6777b538SAndroid Build Coastguard Worker  s.ios.deployment_target = '9.0'
38*6777b538SAndroid Build Coastguard Worker  s.osx.deployment_target = '10.9'
39*6777b538SAndroid Build Coastguard Worker  s.tvos.deployment_target = '9.0'
40*6777b538SAndroid Build Coastguard Worker  s.watchos.deployment_target = '2.0'
41*6777b538SAndroid Build Coastguard Worker  s.requires_arc = false
42*6777b538SAndroid Build Coastguard Worker
43*6777b538SAndroid Build Coastguard Worker  # The unittest need the generate sources from the testing related .proto
44*6777b538SAndroid Build Coastguard Worker  # files. So to add a `test_spec`, there would also need to be something like a
45*6777b538SAndroid Build Coastguard Worker  # `script_phases` to generate them, but there would also need to be a way to
46*6777b538SAndroid Build Coastguard Worker  # ensure `protoc` had be built. Another option would be to move to a model
47*6777b538SAndroid Build Coastguard Worker  # where the needed files are always generated and checked in. Neither of these
48*6777b538SAndroid Build Coastguard Worker  # seem that great at the moment, so the tests have *not* been wired into here
49*6777b538SAndroid Build Coastguard Worker  # at this time.
50*6777b538SAndroid Build Coastguard Workerend
51