forked from wordpress-mobile/WordPress-iOS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPodfile
409 lines (336 loc) · 12.6 KB
/
Podfile
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
source 'https://cdn.cocoapods.org/'
inhibit_all_warnings!
use_frameworks!
platform :ios, '11.0'
workspace 'WordPress.xcworkspace'
## Pods shared between all the targets
## ===================================
##
def wordpress_shared
## for production:
pod 'WordPressShared', '~> 1.8.16'
## for development:
# pod 'WordPressShared', :path => '../WordPress-iOS-Shared'
## while PR is in review:
# pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :branch => ''
# pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :commit => 'efe5a065f3ace331353595ef85eef502baa23497'
end
def aztec
## When using a tagged version, feel free to comment out the WordPress-Aztec-iOS line below.
## When using a commit number (during development) you should provide the same commit number for both pods.
##
## pod 'WordPress-Aztec-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :commit => 'ba8524aba1332550efb05cad583a85ed3511beb5'
## pod 'WordPress-Editor-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :commit => 'ba8524aba1332550efb05cad583a85ed3511beb5'
## pod 'WordPress-Editor-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :tag => '1.5.0.beta.1'
## pod 'WordPress-Editor-iOS', :path => '../AztecEditor-iOS'
pod 'WordPress-Editor-iOS', '~> 1.19.0'
end
def wordpress_ui
## for production:
pod 'WordPressUI', '~> 1.6.0'
## for development:
#pod 'WordPressUI', :path => '../WordPressUI-iOS'
## while PR is in review:
#pod 'WordPressUI', :git => 'https://github.com/wordpress-mobile/WordPressUI-iOS', :branch => 'fix/fancybutton-appearance'
#pod 'WordPressUI', :git => 'https://github.com/wordpress-mobile/WordPressUI-iOS', :commit => '05d82b280a4b65e084f34e282ec392cb80afdec1'
end
def wordpress_kit
pod 'WordPressKit', '~> 4.8.0'
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :tag => ''
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => ''
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => ''
#pod 'WordPressKit', :path => '../WordPressKit-iOS'
end
def shared_with_all_pods
wordpress_shared
pod 'CocoaLumberjack', '3.5.2'
pod 'FormatterKit/TimeIntervalFormatter', '1.8.2'
pod 'NSObject-SafeExpectations', '~> 0.0.4'
end
def shared_with_networking_pods
pod 'Alamofire', '4.8.0'
pod 'Reachability', '3.2'
wordpress_kit
end
def shared_test_pods
pod 'OHHTTPStubs', '6.1.0'
pod 'OHHTTPStubs/Swift', '6.1.0'
pod 'OCMock', '3.4.3'
end
def shared_with_extension_pods
pod 'Gridicons', '~> 1.0.1'
pod 'ZIPFoundation', '~> 0.9.8'
pod 'Down', '~> 0.6.6'
end
def gutenberg(options)
options[:git] = 'http://github.com/wordpress-mobile/gutenberg-mobile/'
local_gutenberg = ENV['LOCAL_GUTENBERG']
if local_gutenberg
options = { :path => local_gutenberg.include?('/') ? local_gutenberg : '../gutenberg-mobile' }
end
pod 'Gutenberg', options
pod 'RNTAztecView', options
gutenberg_dependencies options
end
def gutenberg_dependencies(options)
dependencies = [
'FBReactNativeSpec',
'FBLazyVector',
'React',
'ReactCommon',
'RCTRequired',
'RCTTypeSafety',
'React-Core',
'React-CoreModules',
'React-RCTActionSheet',
'React-RCTAnimation',
'React-RCTBlob',
'React-RCTImage',
'React-RCTLinking',
'React-RCTNetwork',
'React-RCTSettings',
'React-RCTText',
'React-RCTVibration',
'React-cxxreact',
'React-jsinspector',
'React-jsi',
'React-jsiexecutor',
'Yoga',
'Folly',
'glog',
'react-native-keyboard-aware-scroll-view',
'react-native-safe-area',
'react-native-video',
'RNSVG',
'ReactNativeDarkMode',
'react-native-slider',
'react-native-linear-gradient'
]
if options[:path]
podspec_prefix = options[:path]
else
tag_or_commit = options[:tag] || options[:commit]
podspec_prefix = "https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/#{tag_or_commit}"
end
for pod_name in dependencies do
pod pod_name, :podspec => "#{podspec_prefix}/react-native-gutenberg-bridge/third-party-podspecs/#{pod_name}.podspec.json"
end
end
## WordPress iOS
## =============
##
target 'WordPress' do
project 'WordPress/WordPress.xcodeproj'
shared_with_all_pods
shared_with_networking_pods
shared_with_extension_pods
## Gutenberg (React Native)
## =====================
##
gutenberg :tag => 'v1.28.0'
## Third party libraries
## =====================
##
pod 'Charts', '~> 3.2.2'
pod 'Gifu', '3.2.0'
pod 'AppCenter', '2.5.1', :configurations => ['Release-Internal', 'Release-Alpha']
pod 'AppCenter/Distribute', '2.5.1', :configurations => ['Release-Internal', 'Release-Alpha']
pod 'MRProgress', '0.8.3'
pod 'Starscream', '3.0.6'
pod 'SVProgressHUD', '2.2.5'
pod 'ZendeskSupportSDK', '5.0.0'
pod 'AlamofireImage', '3.5.2'
pod 'AlamofireNetworkActivityIndicator', '~> 2.4'
pod 'FSInteractiveMap', :git => 'https://github.com/wordpress-mobile/FSInteractiveMap.git', :tag => '0.2.0'
pod 'JTAppleCalendar', '~> 8.0.2'
## Automattic libraries
## ====================
##
# Production
pod 'Automattic-Tracks-iOS', '~> 0.4.4'
# While in PR
# pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :branch => 'feature/Swift-5-migration'
pod 'NSURL+IDN', '~> 0.4'
pod 'WPMediaPicker', '~> 1.6.1'
## while PR is in review:
# pod 'WPMediaPicker', :git => 'https://github.com/wordpress-mobile/MediaPicker-iOS.git', :branch => ''
# pod 'WPMediaPicker', :path => '../MediaPicker-iOS'
pod 'Gridicons', '~> 1.0.1'
pod 'WordPressAuthenticator', '~> 1.16.0-beta.5'
# While in PR
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => ''
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => ''
# pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS'
pod 'MediaEditor', '~> 1.1.0-beta.2'
# pod 'MediaEditor', :git => 'https://github.com/wordpress-mobile/MediaEditor-iOS.git', :commit => 'a4178ed9b0f3622faafb41dd12503e26c5523a32'
# pod 'MediaEditor', :path => '../MediaEditor-iOS'
aztec
wordpress_ui
target 'WordPressTest' do
inherit! :search_paths
shared_test_pods
pod 'Nimble', '~> 7.3.1'
end
post_install do
puts 'Patching RCTShadowView to fix nested group block - it could be removed after upgrade to 0.62'
%x(patch Pods/React-Core/React/Views/RCTShadowView.m < patches/react-native+0.61.5.patch)
## Convert the 3rd-party license acknowledgements markdown into html for use in the app
require 'commonmarker'
project_root = File.dirname(__FILE__)
acknowledgements = 'Acknowledgments'
markdown = File.read("#{project_root}/Pods/Target Support Files/Pods-WordPress/Pods-WordPress-acknowledgements.markdown")
rendered_html = CommonMarker.render_html(markdown, :DEFAULT)
styled_html = "<head>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 16px;
color: #1a1a1a;
margin: 20px;
}
@media (prefers-color-scheme: dark) {
body {
background: #1a1a1a;
color: white;
}
}
pre {
white-space: pre-wrap;
}
</style>
<title>
#{acknowledgements}
</title>
</head>
<body>
#{rendered_html}
</body>"
## Remove the <h1>, since we've promoted it to <title>
styled_html = styled_html.sub("<h1>Acknowledgements</h1>", '')
## The glog library's license contains a URL that does not wrap in the web view,
## leading to a large right-hand whitespace gutter. Work around this by explicitly
## inserting a <br> in the HTML. Use gsub juuust in case another one sneaks in later.
styled_html = styled_html.gsub('p?hl=en#dR3YEbitojA/COPYING', 'p?hl=en#dR3YEbitojA/COPYING<br>')
File.write("#{project_root}/Pods/Target Support Files/Pods-WordPress/acknowledgements.html", styled_html)
end
end
## Share Extension
## ===============
##
target 'WordPressShareExtension' do
project 'WordPress/WordPress.xcodeproj'
shared_with_extension_pods
aztec
shared_with_all_pods
shared_with_networking_pods
wordpress_ui
end
## DraftAction Extension
## =====================
##
target 'WordPressDraftActionExtension' do
project 'WordPress/WordPress.xcodeproj'
shared_with_extension_pods
aztec
shared_with_all_pods
shared_with_networking_pods
wordpress_ui
end
## Today Widget
## ============
##
target 'WordPressTodayWidget' do
project 'WordPress/WordPress.xcodeproj'
shared_with_all_pods
shared_with_networking_pods
wordpress_ui
end
## All Time Widget
## ============
##
target 'WordPressAllTimeWidget' do
project 'WordPress/WordPress.xcodeproj'
shared_with_all_pods
shared_with_networking_pods
wordpress_ui
end
## This Week Widget
## ============
##
target 'WordPressThisWeekWidget' do
project 'WordPress/WordPress.xcodeproj'
shared_with_all_pods
shared_with_networking_pods
wordpress_ui
end
## Notification Content Extension
## ==============================
##
target 'WordPressNotificationContentExtension' do
project 'WordPress/WordPress.xcodeproj'
wordpress_kit
wordpress_shared
wordpress_ui
end
## Notification Service Extension
## ==============================
##
target 'WordPressNotificationServiceExtension' do
project 'WordPress/WordPress.xcodeproj'
wordpress_kit
wordpress_shared
wordpress_ui
end
## Mocks
## ===================
##
def wordpress_mocks
pod 'WordPressMocks', '~> 0.0.8'
# pod 'WordPressMocks', :git => 'https://github.com/wordpress-mobile/WordPressMocks.git', :commit => ''
# pod 'WordPressMocks', :git => 'https://github.com/wordpress-mobile/WordPressMocks.git', :branch => 'add/screenshot-mocks'
# pod 'WordPressMocks', :path => '../WordPressMocks'
end
## Screenshot Generation
## ===================
##
target 'WordPressScreenshotGeneration' do
project 'WordPress/WordPress.xcodeproj'
wordpress_mocks
pod 'SimulatorStatusMagic'
end
## UI Tests
## ===================
##
target 'WordPressUITests' do
project 'WordPress/WordPress.xcodeproj'
wordpress_mocks
end
# Static Frameworks:
# ============
#
# Make all pods that are not shared across multiple targets into static frameworks by overriding the static_framework? function to return true
# Linking the shared frameworks statically would lead to duplicate symbols
# A future version of CocoaPods may make this easier to do. See https://github.com/CocoaPods/CocoaPods/issues/7428
shared_targets = ['WordPressFlux']
pre_install do |installer|
static = []
dynamic = []
installer.pod_targets.each do |pod|
# Statically linking Sentry results in a conflict with `NSDictionary.objectAtKeyPath`, but dynamically
# linking it resolves this.
if pod.name == "Sentry"
dynamic << pod
next
end
# If this pod is a dependency of one of our shared targets, it must be linked dynamically
if pod.target_definitions.any? { |t| shared_targets.include? t.name }
dynamic << pod
next
end
static << pod
pod.instance_variable_set(:@build_type, Pod::Target::BuildType.static_framework)
end
puts "Installing #{static.count} pods as static frameworks"
puts "Installing #{dynamic.count} pods as dynamic frameworks"
end