-
Notifications
You must be signed in to change notification settings - Fork 11
/
Podfile
98 lines (80 loc) · 2.61 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
# frozen_string_literal: true
source 'https://cdn.cocoapods.org/'
# It can take CocoaPods some time to propagate new versions.
# To avoid waiting, we also publish our pods to our own specs repo.
source 'https://github.com/wordpress-mobile/cocoapods-specs.git'
inhibit_all_warnings!
use_frameworks!
ios_deployment_target = Gem::Version.new('13.0')
platform :ios, ios_deployment_target
# This Podfile defines dependencies across multiple `.xcodeproj` files, so we
# need to explicitly define the workspace to use.
workspace 'WordPressAuthenticator.xcworkspace'
## Third party libraries
## =====================
##
def third_party_pods
pod 'NSURL+IDN', '0.4'
pod 'SVProgressHUD', '2.2.5'
end
def wordpress_authenticator_pods
## Automattic libraries
## ====================
##
## These should match the version requirement from the podspec.
pod 'Gridicons', '~> 1.0'
pod 'WordPressUI', '~> 1.7-beta'
pod 'WordPressKit', '~> 17.0'
pod 'WordPressShared', '~> 2.1-beta'
third_party_pods
end
## WordPress Authenticator
## =======================
##
target 'WordPressAuthenticator' do
project 'WordPressAuthenticator.xcodeproj'
wordpress_authenticator_pods
end
## Unit Tests
## ==========
##
target 'WordPressAuthenticatorTests' do
project 'WordPressAuthenticator.xcodeproj'
wordpress_authenticator_pods
pod 'OCMock', '~> 3.4'
pod 'Expecta', '1.0.6'
pod 'Specta', '1.0.7'
end
target 'AuthenticatorDemo' do
project 'Demo/AuthenticatorDemo.xcodeproj'
pod 'WordPressAuthenticator', path: '.'
end
## Tools
## ==========
##
def swiftlint_version
require 'yaml'
YAML.load_file('.swiftlint.yml')['swiftlint_version']
end
abstract_target 'Tools' do
pod 'SwiftLint', swiftlint_version
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |configuration|
# Let Pods targets inherit deployment target from the app
# This solution is suggested here: https://github.com/CocoaPods/CocoaPods/issues/4859
pod_ios_deployment_target = Gem::Version.new(configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
configuration.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if pod_ios_deployment_target <= ios_deployment_target
# This addresses Xcode 12, 13, and 14 showing an "Update to recommended
# settings" warning on the Pods project.
#
# See:
#
# - https://github.com/CocoaPods/CocoaPods/issues/10189
# - https://github.com/CocoaPods/CocoaPods/issues/11553
configuration.build_settings.delete 'ARCHS'
configuration.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
end
end
end