fastlane-plugin-zhuixi_build_app 1.1.6 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fad17718d37d5da627587c4f30db77319e462e117c4d7b6adda774f968a1a155
|
4
|
+
data.tar.gz: aca9ce718068c91998b268dc0492f184b4fbe5cdd42baae3e963b836d1ce4bd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa066d37d2be2e5b9c077d693b093463f99c66e9e0b678d4a34b9a24923a3c25e5184d148eb069499c61f0d59297f92fd9072fc2358c7832d152070fd5778aca
|
7
|
+
data.tar.gz: 18a1d97b4b6ac191f791a73a9f41e90c22cf03ab705b5579b60e743d1e4ee8b4bb62d837b8a80e56130ee3094094f27f3547bdf29da550d044cd6e7b8b134ce5
|
@@ -20,20 +20,23 @@ module Fastlane
|
|
20
20
|
"platform_id" => lane_context[:platform_id],
|
21
21
|
"game_id" => game_id,
|
22
22
|
})
|
23
|
-
|
24
23
|
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
|
24
|
+
puts request.body
|
25
25
|
http.request(request)
|
26
26
|
end
|
27
27
|
|
28
28
|
if response.code == "200"
|
29
29
|
result = JSON.parse(response.body)
|
30
|
-
puts result
|
31
30
|
if result["code"] == 200
|
32
31
|
data = result["data"]
|
33
32
|
lane_context[:configParams] = data["config"]
|
34
33
|
resourcesUrl = data["resources_url"]
|
35
34
|
return resourcesUrl.to_s
|
35
|
+
else
|
36
|
+
puts "获取打包配置失败:\n#{result}"
|
36
37
|
end
|
38
|
+
else
|
39
|
+
puts "获取打包配置失败:HTTP\n #{response}"
|
37
40
|
end
|
38
41
|
end
|
39
42
|
|
@@ -210,42 +210,52 @@ module Fastlane
|
|
210
210
|
File.open(vconfig_json, "w") do |f|
|
211
211
|
f.puts JSON.pretty_generate(json)
|
212
212
|
end
|
213
|
+
elsif lane_context[:selectPlatformName] == "奇界"
|
214
|
+
other_action.update_plist(
|
215
|
+
plist_path: lane_context[:zhuixi_path] + "/resources/SDKs/BRSDK.plist",
|
216
|
+
block: proc do |plist|
|
217
|
+
plist["direction"] = lane_context[:configParams][:channel_orientation.to_s] == "landscape" ? "2" : "1"
|
218
|
+
end,
|
219
|
+
)
|
220
|
+
elsif lane_context[:selectPlatformName] == "527"
|
221
|
+
other_action.update_plist(
|
222
|
+
plist_path: lane_context[:zhuixi_path] + "/resources/SDKs/QnAggSdkRes.bundle/Params.plist",
|
223
|
+
block: proc do |plist|
|
224
|
+
plist["appID"] = lane_context[:configParams][:channel_appid.to_s]
|
225
|
+
plist["appKey"] = lane_context[:configParams][:channel_appkey.to_s]
|
226
|
+
end,
|
227
|
+
)
|
213
228
|
end
|
214
229
|
end
|
215
|
-
|
216
230
|
# 是否在动态库集合
|
217
231
|
def self.isEmbedFramework(filename)
|
218
232
|
framework_path = filename.to_s
|
219
233
|
framework_name = File.basename(framework_path, ".*") # 提取 .framework 文件的名称
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
UI.error("File not found for #{framework_name}.")
|
227
|
-
return false
|
228
|
-
end
|
234
|
+
# 在 .framework 目录中搜索与文件名相同的文件
|
235
|
+
file_path = Dir.glob("#{framework_path}/#{framework_name}").first
|
236
|
+
if file_path.nil?
|
237
|
+
UI.error("File not found for #{framework_name}.")
|
238
|
+
return false
|
239
|
+
end
|
229
240
|
|
230
|
-
|
231
|
-
|
241
|
+
# 使用 file 命令查看文件类型
|
242
|
+
file_output = sh("file #{file_path}")
|
232
243
|
|
233
|
-
|
234
|
-
|
244
|
+
# 检查文件类型中是否包含 "dynamic" 或 "shared",表示动态库
|
245
|
+
is_dynamic_library = file_output.include?("dynamic") || file_output.include?("shared")
|
235
246
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
end
|
247
|
+
if is_dynamic_library
|
248
|
+
# 文件是动态库
|
249
|
+
# 执行相应的操作
|
250
|
+
# ...
|
251
|
+
puts "文件是动态库 #{framework_name}"
|
252
|
+
return true
|
253
|
+
else
|
254
|
+
# 文件是静态库
|
255
|
+
# 执行其他操作
|
256
|
+
# ...
|
257
|
+
puts "文件是静态库 #{framework_name}"
|
258
|
+
return false
|
249
259
|
end
|
250
260
|
return false
|
251
261
|
end
|
@@ -310,20 +320,30 @@ module Fastlane
|
|
310
320
|
#项目中可能有多个copy files build phases,找到刚刚创建的那个,然后把xx.framework引入
|
311
321
|
|
312
322
|
if !"".eql? lib_real_path and isEmbedFramework(filename)
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
e.settings["ATTRIBUTES"] = ["CodeSignOnCopy", "RemoveHeadersOnCopy"]
|
323
|
+
has_embed_frameworks = false
|
324
|
+
lane_context[:target].copy_files_build_phases.each do |phase|
|
325
|
+
if phase.name == "Embed Frameworks"
|
326
|
+
has_embed_frameworks = true
|
327
|
+
|
328
|
+
phase.add_file_reference(file_ref)
|
329
|
+
phase.dst_subfolder_spec = "10"
|
330
|
+
|
331
|
+
phase.files.each do |file|
|
332
|
+
file.settings = { "ATTRIBUTES" => ["CodeSignOnCopy", "RemoveHeadersOnCopy"] }
|
324
333
|
end
|
325
334
|
end
|
326
335
|
end
|
336
|
+
|
337
|
+
unless has_embed_frameworks
|
338
|
+
embed_phase = lane_context[:target].new_copy_files_build_phase("Embed Frameworks")
|
339
|
+
embed_phase.dst_subfolder_spec = "10"
|
340
|
+
|
341
|
+
embed_phase.add_file_reference(file_ref)
|
342
|
+
|
343
|
+
embed_phase.files.each do |file|
|
344
|
+
file.settings = { "ATTRIBUTES" => ["CodeSignOnCopy", "RemoveHeadersOnCopy"] }
|
345
|
+
end
|
346
|
+
end
|
327
347
|
end
|
328
348
|
lane_context[:target].frameworks_build_phase.add_file_reference(file_ref, true)
|
329
349
|
elsif filename.to_s.end_with?(".plist", ".bundle", ".png", ".storyboard", ".json")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-zhuixi_build_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RedSevenMale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|