cocoapods-soul-component-plugin 0.0.16 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad024af1645c9aecee171d3c7f6ac17db5a06b6ebfa2d05fe20887f3e7ce91f9
|
4
|
+
data.tar.gz: 0ab417a52257004a53cdd315e99fd8146e2bca093b30bc2be04730260ea36e90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61c99291d00195fd2451486012a70288bad857a89f14c05b1ed1d4fb6deaf3f1d82460c91afdf0da4e8d03066969dff8c4947c4620520f0bb3e5360b4cb26430
|
7
|
+
data.tar.gz: 1a2ac21cefc33b4248b7a95c3a3bccd4713353d6bb1d8cdf131219587d6b32900f62827333882e8b33052344b54de07ac1cb69b7dec2e66a83bc390ffb16af74
|
@@ -44,7 +44,7 @@ end
|
|
44
44
|
module CocoapodsSoulComponentPlugin
|
45
45
|
@@components = []
|
46
46
|
@@use_source = false
|
47
|
-
@@
|
47
|
+
@@import_dependency = ''
|
48
48
|
|
49
49
|
def self.use_source=(t_use_source)
|
50
50
|
@@use_source = t_use_source
|
@@ -54,12 +54,12 @@ module CocoapodsSoulComponentPlugin
|
|
54
54
|
@@use_source
|
55
55
|
end
|
56
56
|
|
57
|
-
def self.
|
58
|
-
@@
|
57
|
+
def self.import_dependency=(t_import_dependency)
|
58
|
+
@@import_dependency = t_import_dependency
|
59
59
|
end
|
60
60
|
|
61
|
-
def self.
|
62
|
-
@@
|
61
|
+
def self.import_dependency
|
62
|
+
@@import_dependency
|
63
63
|
end
|
64
64
|
|
65
65
|
def self.components
|
@@ -144,32 +144,43 @@ module CocoapodsSoulComponentPlugin
|
|
144
144
|
json = File.read(component_file_path)
|
145
145
|
obj = JSON.parse(json)
|
146
146
|
|
147
|
-
|
147
|
+
dependency_user = nil
|
148
|
+
dependency_import = nil
|
148
149
|
if File.exist?(component_user_file_path)
|
149
150
|
json_user = File.read(component_user_file_path)
|
150
151
|
obj_user = JSON.parse(json_user)
|
151
|
-
|
152
|
+
dependency_user = obj_user['dependencies']
|
152
153
|
end
|
153
154
|
|
154
|
-
if
|
155
|
-
|
156
|
-
|
155
|
+
if @@import_dependency.length.positive?
|
156
|
+
import_json = JSON.parse(self.import_dependency)
|
157
|
+
dependency_import = import_json['dependencies']
|
157
158
|
end
|
158
159
|
|
159
160
|
dependencies = obj['dependencies']
|
160
161
|
dependencies.each do |each|
|
161
162
|
component = Soul_Component.new(each[0], each[1]['local'], each[1]['submodule'], each[1]['version'], each[1]['git'],
|
162
163
|
each[1]['branch'], each[1]['path'], each[1]['commit'])
|
163
|
-
if
|
164
|
-
component.local =
|
165
|
-
component.submodule =
|
166
|
-
component.version =
|
167
|
-
component.git =
|
168
|
-
component.branch =
|
169
|
-
component.path =
|
170
|
-
component.commit =
|
164
|
+
if dependency_user && dependency_user[component.name]
|
165
|
+
component.local = dependency_user[component.name]['local'] if dependency_user[component.name]['local']
|
166
|
+
component.submodule = dependency_user[component.name]['submodule'] if dependency_user[component.name]['submodule']
|
167
|
+
component.version = dependency_user[component.name]['version']
|
168
|
+
component.git = dependency_user[component.name]['git'] if dependency_user[component.name]['git']
|
169
|
+
component.branch = dependency_user[component.name]['branch']
|
170
|
+
component.path = dependency_user[component.name]['path']
|
171
|
+
component.commit = dependency_user[component.name]['commit']
|
171
172
|
Pod::UI.puts "使用用户配置覆盖。参数:#{component.to_hash}".green
|
172
173
|
end
|
174
|
+
if dependency_import && dependency_import[component.name]
|
175
|
+
component.local = dependency_import[component.name]['local'] if dependency_import[component.name]['local']
|
176
|
+
component.submodule = dependency_import[component.name]['submodule'] if dependency_import[component.name]['submodule']
|
177
|
+
component.version = dependency_import[component.name]['version']
|
178
|
+
component.git = dependency_import[component.name]['git'] if dependency_import[component.name]['git']
|
179
|
+
component.branch = dependency_import[component.name]['branch']
|
180
|
+
component.path = dependency_import[component.name]['path']
|
181
|
+
component.commit = dependency_import[component.name]['commit']
|
182
|
+
Pod::UI.puts "使用导入配置覆盖。参数:#{component.to_hash}".green
|
183
|
+
end
|
173
184
|
if @@use_source
|
174
185
|
component.local = true
|
175
186
|
if Pod::Downloader::Git.check_if_has_auth_clone(component.git) == false
|
@@ -211,17 +222,18 @@ module CocoapodsSoulComponentPlugin
|
|
211
222
|
local_path += each.commit.to_s
|
212
223
|
elsif !each.branch.nil?
|
213
224
|
local_path += '-'
|
214
|
-
local_path += each.branch.to_s
|
225
|
+
local_path += each.branch.to_s.gsub('/','-')
|
215
226
|
elsif !each.version.nil?
|
216
227
|
local_path += '-'
|
217
|
-
local_path += each.version.to_s
|
228
|
+
local_path += each.version.to_s.gsub('/','-')
|
218
229
|
end
|
219
230
|
target_path = "#{root_path}/LocalPods/#{local_path}"
|
220
231
|
each.path = target_path
|
221
232
|
|
222
233
|
if File.exist?(target_path) == false
|
223
234
|
options = { git: each.git, commit: each.commit, tag: each.version, branch: each.branch }
|
224
|
-
|
235
|
+
# 这行代码会自动清空branch并且设置commit
|
236
|
+
# options = Pod::Downloader.preprocess_options(options)
|
225
237
|
downloader = Pod::Downloader.for_target(target_path, options)
|
226
238
|
Pod::UI.puts "本地依赖 #{each.name} 不存在,即将进行下载 。参数:#{options}".green
|
227
239
|
downloader.download_deep
|
@@ -250,11 +262,9 @@ module Pod
|
|
250
262
|
|
251
263
|
|
252
264
|
def initialize(argv)
|
253
|
-
CocoapodsSoulComponentPlugin.use_source = argv.flag?('source')
|
254
|
-
if argv.option('import-dependency')
|
255
|
-
CocoapodsSoulComponentPlugin.input_dependency = argv.option('import-dependency')
|
256
|
-
end
|
257
265
|
super
|
266
|
+
CocoapodsSoulComponentPlugin.import_dependency = argv.option('local-dependency',CocoapodsSoulComponentPlugin.import_dependency)
|
267
|
+
CocoapodsSoulComponentPlugin.use_source = argv.flag?('source', CocoapodsSoulComponentPlugin.use_source)
|
258
268
|
end
|
259
269
|
|
260
270
|
alias old_run run
|
@@ -265,6 +275,10 @@ module Pod
|
|
265
275
|
old_run
|
266
276
|
CocoapodsSoulComponentPlugin.post_run if CocoapodsSoulComponentPlugin.use_components
|
267
277
|
end
|
278
|
+
|
279
|
+
def validate!
|
280
|
+
super
|
281
|
+
end
|
268
282
|
end
|
269
283
|
end
|
270
284
|
|
@@ -277,7 +291,9 @@ module Pod
|
|
277
291
|
return
|
278
292
|
end
|
279
293
|
|
280
|
-
#
|
294
|
+
# 当使用本地Flutter并且json中有SOFEngine项时会报奇怪的错误
|
295
|
+
# if name == 'SOFEngine'
|
296
|
+
# puts 1
|
281
297
|
# puts name, requirements
|
282
298
|
# end
|
283
299
|
|
@@ -290,8 +306,11 @@ module Pod
|
|
290
306
|
[each.version]
|
291
307
|
end
|
292
308
|
end
|
293
|
-
|
309
|
+
# if name == 'SOFEngine'
|
310
|
+
# puts 2
|
311
|
+
# puts name, requirements
|
312
|
+
# end
|
294
313
|
old_initialize(name, *requirements)
|
295
314
|
end
|
296
315
|
end
|
297
|
-
end
|
316
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-soul-component-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.0.3
|
72
|
+
rubygems_version: 3.0.3.1
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: A longer description of cocoapods-soul-component-plugin.
|