-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathPodfile
203 lines (170 loc) · 7.49 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
platform :ios, '12.0'
inhibit_all_warnings!
source 'https://github.com/CocoaPods/Specs.git'
require './vite_pod'
# Vite ViteOfficial ViteTest ViteDapp
target_name = 'ViteOfficial'
def vite_config(config, name)
if name == 'Vite'
if config.name.include?("Debug")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','DEBUG=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['DEBUG']
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -Xfrontend -debug-time-function-bodies'
elsif config.name.include?("Release")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = []
end
elsif name == 'ViteOfficial'
if config.name.include?("Debug")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','DEBUG=1','OFFICIAL=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['DEBUG','OFFICIAL']
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -Xfrontend -debug-time-function-bodies'
elsif config.name.include?("Release")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','OFFICIAL=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = 'OFFICIAL'
end
elsif name == 'ViteTest'
if config.name.include?("Debug")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','DEBUG=1','OFFICIAL=1','TEST=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['DEBUG','OFFICIAL', 'TEST']
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -Xfrontend -debug-time-function-bodies'
elsif config.name.include?("Release")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','OFFICIAL=1','TEST=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['OFFICIAL', 'TEST']
end
elsif name == 'ViteDapp'
if config.name.include?("Debug")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','DEBUG=1','DAPP=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['DEBUG','DAPP']
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -Xfrontend -debug-time-function-bodies'
elsif config.name.include?("Release")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','DAPP=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = 'DAPP'
end
end
end
#app_project = Xcodeproj::Project.open(Dir.glob("*.xcodeproj")[0])
#app_project.native_targets.each do |target|
# if target.name == 'Vite'
# target.build_configurations.each do |config|
# vite_config config, isOfficial
# end
# end
#end
#app_project.save
target target_name do
use_frameworks!
#vite kit
vite_community_git = 'git@github.com:vitelabs/vite-community-ios.git'
vite_business_git = 'https://github.com/vitelabs/vite-business-ios.git'
vite_wallet_git = 'https://github.com/vitelabs/vite-swift-kit.git'
vite_hd_git = 'https://github.com/vitelabs/vite-hd-wallet-kit-ios.git'
HDWalletKit_git = 'https://github.com/vitelabs/HDWallet.git'
web3_git = 'https://github.com/vitelabs/web3swift.git'
vite_community_commit = 'ab006971c2b605c60c83424fe5b96846cbdf4216'
vite_business_commit = 'bc934e2e2b9f3b42139fa1351cbc8c5f277a6673'
vite_wallet_commit = '981a92d5012a0dcae0324b29e8657e78bced55ed'
vite_hd_commit = 'db67644220ab1582459d08d47119ed26dcba8d47'
HDWalletKit_commit = '26df860a4ce7cb26e299aa4f3e0338e8e7041b26'
web3_commit = 'd2507cce4faa17916efa14fd84922a3e6b411634'
if target_name == 'ViteOfficial' || target_name == 'ViteTest'
vite_pod 'ViteCommunity', :git => vite_community_git, :commit => vite_community_commit
end
vite_pod 'ViteBusiness', :git => vite_business_git, :commit => vite_business_commit
vite_pod 'ViteWallet', :git => vite_wallet_git, :commit => vite_wallet_commit
# pod_branch = 'pre-mainnet'
# if isOfficial
# vite_pod 'ViteCommunity', :git => vite_community_git, :branch => pod_branch
# end
# vite_pod 'ViteBusiness', :git => vite_business_git, :branch => pod_branch
# vite_pod 'ViteWallet', :git => vite_wallet_git, :branch => pod_branch
vite_pod 'Vite_HDWalletKit', :git => vite_hd_git, :commit => vite_hd_commit
vite_pod 'HDWalletKit', :git => HDWalletKit_git, :commit => HDWalletKit_commit
vite_pod 'web3swift', :git => web3_git, :commit => web3_commit
pod 'Charts', :git => 'https://github.com/danielgindi/Charts.git', :tag => 'v4.1.0'
# pod 'HDWalletKit', '0.3.6'
pod 'SnapKit', '~> 4.0.0'
pod 'BigInt', '~> 5.0'
pod 'R.swift', '5.0.0.alpha.3'
pod 'JSONRPCKit', '~> 3.0.0'
pod 'PromiseKit', '~> 6.8.4'
pod 'APIKit'
pod 'ObjectMapper'
pod 'MBProgressHUD'
pod 'KeychainSwift', '13.0.0'
pod 'Moya'
pod 'MJRefresh', '3.1.15.7'
pod 'KMNavigationBarTransition'
pod 'XCGLogger', '~> 7.0'
pod 'pop', '~> 1.0'
pod 'DACircularProgress', '2.3.1'
pod 'Kingfisher', '~> 4.0'
pod 'NYXImagesKit', '2.3'
pod 'SwiftProtobuf', '1.17.0'
#request
pod 'SwiftyJSON'
#UI Control
pod 'ActionSheetPicker-3.0'
pod 'MBProgressHUD'
pod 'Toast-Swift', '~> 4.0.1'
pod 'RazzleDazzle', :git => 'https://github.com/mazhigbee-pb/RazzleDazzle.git', :branch => 'xcode-13-beta-fixes'
pod 'CHIPageControl'
#table static form
pod 'Eureka', '~> 5.3.0'
# pod 'Eureka', :git => 'https://github.com/xmartlabs/Eureka.git', :branch => 'xcode12'
#RX
pod 'RxSwift', '~> 4.0'
pod 'RxCocoa'
pod 'RxDataSources', '~> 3.0'
pod 'NSObject+Rx'
pod 'RxOptional'
pod 'RxGesture'
pod 'Then'
pod 'Action'
pod 'ReusableKit', '~> 2.1.0'
pod 'ReactorKit'
#code review
pod 'SwiftLint', '0.31.0'
#crash
# pod 'Firebase/Core'
# pod 'Firebase/Analytics'
# pod 'Firebase/Performance'
# pod 'Firebase/RemoteConfig'
# pod 'MLeaksFinder', :configurations => ['Debug']
# pod 'LookinServer', :configurations => ['Debug']
if target_name == 'ViteTest'
pod 'Bagel', '~> 1.3.2'
else
pod 'Bagel', '~> 1.3.2', :configurations => ['Debug']
end
pod 'FSPagerView'
target 'ViteTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
if config.name.include?("Debug")
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
else
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
vite_config config, target_name
end
if ['RazzleDazzle', 'JSONRPCKit', 'APIKit'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
elsif ['web3.swift.pod', 'Charts'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
else
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
end