aboutsummaryrefslogtreecommitdiff
path: root/GoogleToolboxForMac.podspec
blob: 512f4d63ab18b09e870bd8c7e868bf67d466420d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
Pod::Spec.new do |s|
  s.name             = 'GoogleToolboxForMac'
  s.version          = '2.3.0'
  s.author           = 'Google Inc.'
  s.license          = { :type => 'Apache', :file => 'LICENSE' }
  s.homepage         = 'https://github.com/google/google-toolbox-for-mac'
  s.source           = { :git => 'https://github.com/google/google-toolbox-for-mac.git',
                         :tag => "v#{s.version}" }
  s.summary          = 'Google utilities for iOS and OSX development.'
  s.description      = <<-DESC
      A collection of source from different Google projects that may be of use
      to developers working on iOS or OS X projects.
                       DESC

  s.osx.deployment_target = '10.7'
  s.ios.deployment_target = '9.0'
  s.tvos.deployment_target = '9.0'

  s.requires_arc = false

  # Generally developers should use specific subspecs themselves to get the things they
  # want; but set the default to ensure the testing only code doesn't bundle
  # into a shipping app. This has come up a few times issues 130, 138. The current
  # list here is everything that doesn't have a platform requirement and isn't
  # testing only.
  s.default_subspecs = 'Defines', 'Core', 'GeometryUtils', 'KVO', 'Logger', 'Regex',
                       'StringEncoding', 'SystemVersion', 'URLBuilder', 'NSData+zlib',
                       'NSDictionary+URLArguments', 'NSFileHandle+UniqueName',
                       'NSScanner+JSON', 'NSString+HTML', 'NSString+URLArguments',
                       'NSString+XML', 'NSThread+Blocks'

  s.subspec 'Defines' do |sp|
    sp.public_header_files = 'GTMDefines.h'
    sp.source_files = 'GTMDefines.h'
  end

  s.subspec 'Core' do |sp|
    sp.source_files =
        'DebugUtils/GTMTypeCasting.h',
        'Foundation/GTMLocalizedString.h',
        'Foundation/GTMLogger.h'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'DebugUtils' do |sp|
    sp.source_files =
        'DebugUtils/GTMDebugSelectorValidation.{h,m}',
        'DebugUtils/GTMDebugThreadValidation.h',
        'DebugUtils/GTMMethodCheck.h'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'GeometryUtils' do |sp|
    sp.source_files = 'Foundation/GTMGeometryUtils.{h,m}'
    sp.frameworks = 'CoreGraphics'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'KVO' do |sp|
    sp.source_files =
        'Foundation/GTMNSObject+KeyValueObserving.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Core', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/DebugUtils', "#{s.version}"
  end

  s.subspec 'Logger' do |sp|
    sp.source_files = 'Foundation/GTMLogger.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  # We cannot add a target for Foundaat/GTMLogger+ASL.{h,m}.
  # asl.h is not a modular header, and so cannot be imported
  # in a modulemap, which CocoaPods does by default when it
  # creates frameworks.

  s.subspec 'Regex' do |sp|
    sp.source_files = 'Foundation/GTMRegex.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  # We cannot add a target for Foundation/GTMSQLite.{h,m}.
  # sqlite3.h is not a modular header, and so cannot be imported
  # in a modulemap, which CocoaPods does by default when it
  # creates frameworks.

  s.subspec 'StackTrace' do |sp|
    sp.source_files = 'Foundation/GTMStackTrace.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'StringEncoding' do |sp|
    sp.source_files = 'Foundation/GTMStringEncoding.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'SystemVersion' do |sp|
    sp.source_files = 'Foundation/GTMSystemVersion.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'URLBuilder' do |sp|
    sp.source_files = 'Foundation/GTMURLBuilder.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Core', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/NSDictionary+URLArguments', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/NSString+URLArguments', "#{s.version}"
  end


  s.subspec 'NSData+zlib' do |sp|
    sp.source_files = 'Foundation/GTMNSData+zlib.{h,m}'
    sp.requires_arc = 'Foundation/GTMNSData+zlib.{h,m}'
    sp.libraries = 'z'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'NSDictionary+URLArguments' do |sp|
    sp.source_files = 'Foundation/GTMNSDictionary+URLArguments.{h,m}'
    sp.requires_arc = 'Foundation/GTMNSDictionary+URLArguments.{h,m}'
    sp.dependency 'GoogleToolboxForMac/DebugUtils', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/NSString+URLArguments', "#{s.version}"
  end

  s.subspec 'NSFileHandle+UniqueName' do |sp|
    sp.source_files = 'Foundation/GTMNSFileHandle+UniqueName.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'NSScanner+JSON' do |sp|
    sp.source_files = 'Foundation/GTMNSScanner+JSON.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'NSString+HTML' do |sp|
    sp.source_files = 'Foundation/GTMNSString+HTML.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Core', "#{s.version}"
  end

  s.subspec 'NSString+URLArguments' do |sp|
    sp.source_files = 'Foundation/GTMNSString+URLArguments.{h,m}'
  end

  s.subspec 'NSString+XML' do |sp|
    sp.source_files = 'Foundation/GTMNSString+XML.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'NSThread+Blocks' do |sp|
    sp.source_files = 'Foundation/GTMNSThread+Blocks.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'TimeUtils' do |sp|
    sp.source_files = 'Foundation/GTMTimeUtils.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'iPhone' do |sp|
    sp.platform = :ios, '9.0'
    sp.source_files =
        'iPhone/GTMFadeTruncatingLabel.{h,m}',
        'iPhone/GTMUIImage+Resize.{h,m}',
        'iPhone/GTMUILocalizer.{h,m}',
    sp.requires_arc = 'iPhone/GTMUIImage+Resize.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'RoundedRectPath' do |sp|
    sp.platform = :ios, '9.0'
    sp.source_files = 'iPhone/GTMRoundedRectPath.{h,m}'
    sp.requires_arc = 'iPhone/GTMRoundedRectPath.{h,m}'
    sp.frameworks = 'CoreGraphics'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
  end

  s.subspec 'UIFont+LineHeight' do |sp|
    sp.platform = :ios, '9.0'
    sp.source_files = 'iPhone/GTMUIFont+LineHeight.{h,m}'
    sp.requires_arc = 'iPhone/GTMUIFont+LineHeight.{h,m}'
  end

  s.subspec 'UnitTesting' do |sp|
    sp.platform = :ios, '9.0'
    sp.source_files =
        'UnitTesting/GTMFoundationUnitTestingUtilities.{h,m}',
        'UnitTesting/GTMSenTestCase.{h,m}',
        'UnitTesting/GTMTestTimer.h',
    sp.frameworks = 'CoreGraphics', 'QuartzCore'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/Regex', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/SystemVersion', "#{s.version}"
  end

  s.subspec 'UnitTestingAppLib' do |sp|
    sp.platform = :ios, '9.0'
    sp.source_files =
        'UnitTesting/GTMCodeCoverageApp.h',
        'UnitTesting/GTMIPhoneUnitTestDelegate.{h,m}'
    sp.dependency 'GoogleToolboxForMac/Defines', "#{s.version}"
    sp.dependency 'GoogleToolboxForMac/UnitTesting', "#{s.version}"
  end

end