forked from mxcl/PromiseKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PromiseKit.podspec
194 lines (163 loc) · 7.01 KB
/
PromiseKit.podspec
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
Pod::Spec.new do |s|
s.name = "PromiseKit"
`xcodebuild -project PromiseKit.xcodeproj -showBuildSettings` =~ /CURRENT_PROJECT_VERSION = ((\d\.)+\d)/
abort("No version detected") if $1.nil?
s.version = $1
s.source = {
:git => "https://github.com/mxcl/#{s.name}.git",
:tag => s.version,
:submodules => true
}
s.license = 'MIT'
s.summary = 'Promises for Swift & ObjC.'
s.homepage = 'http://promisekit.org'
s.description = 'A thoughtful and complete implementation of promises for iOS, macOS, watchOS and tvOS with first-class support for both Objective-C and Swift.'
s.social_media_url = 'https://twitter.com/mxcl'
s.authors = { 'Max Howell' => 'mxcl@me.com' }
s.documentation_url = 'http://promisekit.org/docs/'
s.default_subspecs = 'Foundation', 'UIKit', 'QuartzCore'
s.requires_arc = true
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'
s.subspec 'Accounts' do |ss|
ss.ios.source_files = ss.osx.source_files = 'Extensions/Accounts/Sources/*'
ss.ios.frameworks = ss.osx.frameworks = 'Accounts'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'Alamofire' do |ss|
ss.source_files = 'Extensions/Alamofire/Sources/*'
ss.dependency 'Alamofire', '~> 4.0'
ss.dependency 'PromiseKit/CorePromise'
ss.ios.deployment_target = '9.0'
ss.osx.deployment_target = '10.11'
ss.watchos.deployment_target = '2.0'
ss.tvos.deployment_target = '9.0'
end
s.subspec 'AddressBook' do |ss|
ss.ios.source_files = 'Extensions/AddressBook/Sources/*'
ss.ios.frameworks = 'AddressBook'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'AssetsLibrary' do |ss|
ss.ios.source_files = 'Extensions/AssetsLibrary/Sources/*'
ss.ios.frameworks = 'AssetsLibrary'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'AVFoundation' do |ss|
ss.ios.source_files = 'Extensions/AVFoundation/Sources/*'
ss.ios.frameworks = 'AVFoundation'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'Bolts' do |ss|
ss.source_files = 'Extensions/Bolts/Sources/*'
ss.dependency 'PromiseKit/CorePromise'
ss.dependency 'Bolts', '~> 1.6.0'
end
s.subspec 'CloudKit' do |ss|
ss.source_files = 'Extensions/CloudKit/Sources/*'
ss.frameworks = 'CloudKit'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'CoreBluetooth' do |ss|
ss.ios.source_files = ss.osx.source_files = ss.tvos.source_files = 'Extensions/CoreBluetooth/Sources/*'
ss.ios.frameworks = ss.osx.frameworks = ss.tvos.frameworks = 'CoreBluetooth'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'CorePromise' do |ss|
hh = Dir['Sources/*.h'] - Dir['Sources/*+Private.h']
cc = Dir['Sources/*.swift'] - ['Sources/SwiftPM.swift']
cc << 'Sources/{after,AnyPromise,GlobalState,dispatch_promise,hang,join,PMKPromise,when}.m'
cc += hh
ss.source_files = cc
ss.public_header_files = hh
ss.preserve_paths = 'Sources/AnyPromise+Private.h', 'Sources/PMKCallVariadicBlock.m', 'Sources/NSMethodSignatureForBlock.m'
ss.frameworks = 'Foundation'
end
s.subspec 'CoreLocation' do |ss|
ss.source_files = 'Extensions/CoreLocation/Sources/*'
ss.watchos.source_files = 'Extensions/CoreLocation/Sources/CLGeocoder*'
ss.dependency 'PromiseKit/CorePromise'
ss.frameworks = 'CoreLocation'
end
s.subspec 'EventKit' do |ss|
ss.ios.source_files = ss.osx.source_files = ss.watchos.source_files = 'Extensions/EventKit/Sources/*'
ss.ios.frameworks = ss.osx.frameworks = ss.watchos.frameworks = 'EventKit'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'Foundation' do |ss|
base_files = Dir['Extensions/Foundation/Sources/*']
nstask_files = Dir['Extensions/Foundation/Sources/*NSTask*']
base_files -= nstask_files
ss.source_files = base_files
ss.osx.source_files = base_files + nstask_files
ss.dependency 'PromiseKit/CorePromise'
ss.frameworks = 'Foundation'
end
s.subspec 'MapKit' do |ss|
ss.ios.source_files = ss.osx.source_files = ss.tvos.source_files = 'Extensions/MapKit/Sources/*'
ss.ios.frameworks = ss.osx.frameworks = ss.tvos.frameworks = 'MapKit'
ss.tvos.deployment_target = '9.2'
ss.dependency 'PromiseKit/CorePromise'
# respecify due to CocoaPods bug where specifying any
# deployment_target on a subspec causes all other platforms
# to not inherit deployment targets from their parent spec
ss.ios.deployment_target = '8.0'
ss.osx.deployment_target = '10.10'
ss.watchos.deployment_target = '2.0'
end
s.subspec 'MessageUI' do |ss|
ss.ios.source_files = 'Extensions/MessagesUI/Sources/*'
ss.ios.frameworks = 'MessageUI'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'OMGHTTPURLRQ' do |ss|
ss.source_files = 'Extensions/OMGHTTPURLRQ/Sources/*'
ss.dependency 'PromiseKit/Foundation'
ss.dependency 'OMGHTTPURLRQ', '~> 3.2'
end
s.subspec 'Photos' do |ss|
ss.ios.source_files = ss.tvos.source_files = 'Extensions/Photos/Sources/*'
ss.ios.frameworks = ss.tvos.frameworks = 'Photos'
ss.tvos.deployment_target = '10.0'
ss.dependency 'PromiseKit/CorePromise'
# respecify due to CocoaPods bug where specifying any
# deployment_target on a subspec causes all other platforms
# to not inherit deployment targets from their parent spec
ss.ios.deployment_target = '8.0'
ss.osx.deployment_target = '10.10'
ss.watchos.deployment_target = '2.0'
end
s.subspec 'QuartzCore' do |ss|
ss.osx.source_files = ss.ios.source_files = ss.tvos.source_files = 'Extensions/QuartzCore/Sources/*'
ss.osx.frameworks = ss.ios.frameworks = ss.tvos.frameworks = 'QuartzCore'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'Social' do |ss|
ss.ios.source_files = 'Extensions/Social/Sources/*'
ss.osx.source_files = Dir['Extensions/Social/Sources/*'] - ['Categories/Social/Sources/*SLComposeViewController+Promise.swift']
ss.ios.frameworks = ss.osx.frameworks = 'Social'
ss.dependency 'PromiseKit/Foundation'
end
s.subspec 'StoreKit' do |ss|
ss.ios.source_files = ss.osx.source_files = ss.tvos.source_files = 'Extensions/StoreKit/Sources/*'
ss.ios.frameworks = ss.osx.frameworks = ss.tvos.frameworks = 'StoreKit'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'SystemConfiguration' do |ss|
ss.ios.source_files = ss.osx.source_files = ss.tvos.source_files = 'Extensions/SystemConfiguration/Sources/*'
ss.ios.frameworks = ss.osx.frameworks = ss.tvos.frameworks = 'SystemConfiguration'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'UIKit' do |ss|
ss.ios.source_files = ss.tvos.source_files = 'Extensions/UIKit/Sources/*'
ss.tvos.frameworks = ss.ios.frameworks = 'UIKit'
ss.dependency 'PromiseKit/CorePromise'
end
s.subspec 'WatchConnectivity' do |ss|
ss.ios.source_files = ss.watchos.source_files = 'Extensions/WatchConnectivity/Sources/*'
ss.ios.frameworks = ss.watchos.frameworks = 'WatchConnectivity'
ss.dependency 'PromiseKit/CorePromise'
end
end