This repository has been archived by the owner on Dec 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
/
Podfile
106 lines (97 loc) · 3.41 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
MINIMUM_IOS_VERSION = '12.0'
platform :ios, MINIMUM_IOS_VERSION
def shared_test_pods
pod 'Protobuf', '~> 3.5.0', :inhibit_warnings => true
pod 'SwiftLint'
end
target 'ScienceJournal' do
use_frameworks!
# Pods for ScienceJournal
## Drive
pod 'GoogleAPIClientForREST/Drive', '~> 1.2.1', :inhibit_warnings => true
## MDC
pod 'MaterialComponents/ActionSheet'
pod 'MaterialComponents/ActivityIndicator'
pod 'MaterialComponents/AnimationTiming'
pod 'MaterialComponents/AppBar'
pod 'MaterialComponents/BottomSheet'
pod 'MaterialComponents/ButtonBar'
pod 'MaterialComponents/Buttons'
pod 'MaterialComponents/CollectionCells'
pod 'MaterialComponents/CollectionLayoutAttributes'
pod 'MaterialComponents/Collections'
pod 'MaterialComponents/Dialogs'
pod 'MaterialComponents/Dialogs+ColorThemer'
pod 'MaterialComponents/FeatureHighlight'
pod 'MaterialComponents/FeatureHighlight+ColorThemer'
pod 'MaterialComponents/FlexibleHeader'
pod 'MaterialComponents/HeaderStackView'
pod 'MaterialComponents/Ink'
pod 'MaterialComponents/NavigationBar'
pod 'MaterialComponents/OverlayWindow'
pod 'MaterialComponents/PageControl'
pod 'MaterialComponents/Palettes'
pod 'MaterialComponents/private/KeyboardWatcher'
pod 'MaterialComponents/private/Overlay'
pod 'MaterialComponents/ProgressView'
pod 'MaterialComponents/ShadowElevations'
pod 'MaterialComponents/ShadowLayer'
pod 'MaterialComponents/Snackbar'
pod 'MaterialComponents/Tabs'
pod 'MaterialComponents/TextFields', :inhibit_warnings => true
pod 'MaterialComponents/Themes'
pod 'MaterialComponents/Typography'
## Protobuf
pod 'Protobuf', '~> 3.5.0', :inhibit_warnings => true
## ZipArchive
pod 'SSZipArchive', '2.1.1'
## SnapKit
pod 'SnapKit', '5.0.0'
target 'ScienceJournalTests' do
inherit! :search_paths
shared_test_pods
end
end
target 'ScienceJournalUITests' do
inherit! :search_paths
shared_test_pods
end
post_install do |installer|
deployment_target = MINIMUM_IOS_VERSION
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if installer.config.verbose?
puts "Setting deployment target #{deployment_target} for #{config.name} on #{target.name}..."
end
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
upgrade_to_recommended_settings! config
end
end
puts "Generating Science Journal protos..."
system("cd Protos && ./generate.sh")
puts "Updating version numbers and generating plist..."
system("cd Scripts && ./update_version_numbers.sh")
puts "Removing unfixable warnings..."
remove_unfixable_warnings! installer
end
def upgrade_to_recommended_settings! config
if Pod::VERSION == '1.7.3'
# Having this set triggers Xcode's "Upgrade to recommended settings"
config.build_settings.delete('ARCHS')
end
end
def remove_unfixable_warnings! installer
installer.pod_targets.each do |target|
if target.name == 'MaterialComponents' && target.version == '85.0.0'
# The *ColorThemer types currently emit deprecation warnings,
# but the new versions aren't available yet.
installer.pods_project.files.map(&:path).grep(/MDC\w+ColorThemer.h/).each do |file|
path = "Pods/MaterialComponents/#{file}"
content = IO.read(path).gsub(/__deprecated_msg\([^)]*\)/, '')
File.chmod(0644, path)
IO.write(path, content)
File.chmod(0444, path)
end
end
end
end