fastlane-plugin-zhuixi_build_app 1.1.6 → 1.1.7
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: f6ef53eff8b21ea36866a0e6aa61ad4c0d27eb9b8708facf7c16b50a253f2662
|
4
|
+
data.tar.gz: b6aca2fd9d0c0b9cf82ada3d92f83c4681d0a8343fa491610eb3a19336aa8ecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d093def896b1aebfaa9e3f6d48aa2f1b478de949938efbd5e3e2603b7b8b667e8325d8db6c13703b3a3fb775f19765bb825e49deed6183350979a58ecc89c061
|
7
|
+
data.tar.gz: '084abf57a1139ede8e608ac8e9b6b7bc916690fe5a76a5379b79120a6f1abb0c03608281cfb89ebd1b55bc37771d8cf3554c14d07e6e3f777b6b835f1961f336'
|
@@ -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,44 @@ 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
|
+
)
|
213
220
|
end
|
214
221
|
end
|
215
|
-
|
216
222
|
# 是否在动态库集合
|
217
223
|
def self.isEmbedFramework(filename)
|
218
224
|
framework_path = filename.to_s
|
219
225
|
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
|
226
|
+
# 在 .framework 目录中搜索与文件名相同的文件
|
227
|
+
file_path = Dir.glob("#{framework_path}/#{framework_name}").first
|
228
|
+
if file_path.nil?
|
229
|
+
UI.error("File not found for #{framework_name}.")
|
230
|
+
return false
|
231
|
+
end
|
229
232
|
|
230
|
-
|
231
|
-
|
233
|
+
# 使用 file 命令查看文件类型
|
234
|
+
file_output = sh("file #{file_path}")
|
232
235
|
|
233
|
-
|
234
|
-
|
236
|
+
# 检查文件类型中是否包含 "dynamic" 或 "shared",表示动态库
|
237
|
+
is_dynamic_library = file_output.include?("dynamic") || file_output.include?("shared")
|
235
238
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
end
|
239
|
+
if is_dynamic_library
|
240
|
+
# 文件是动态库
|
241
|
+
# 执行相应的操作
|
242
|
+
# ...
|
243
|
+
puts "文件是动态库 #{framework_name}"
|
244
|
+
return true
|
245
|
+
else
|
246
|
+
# 文件是静态库
|
247
|
+
# 执行其他操作
|
248
|
+
# ...
|
249
|
+
puts "文件是静态库 #{framework_name}"
|
250
|
+
return false
|
249
251
|
end
|
250
252
|
return false
|
251
253
|
end
|
@@ -310,20 +312,30 @@ module Fastlane
|
|
310
312
|
#项目中可能有多个copy files build phases,找到刚刚创建的那个,然后把xx.framework引入
|
311
313
|
|
312
314
|
if !"".eql? lib_real_path and isEmbedFramework(filename)
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
e.settings["ATTRIBUTES"] = ["CodeSignOnCopy", "RemoveHeadersOnCopy"]
|
315
|
+
has_embed_frameworks = false
|
316
|
+
lane_context[:target].copy_files_build_phases.each do |phase|
|
317
|
+
if phase.name == "Embed Frameworks"
|
318
|
+
has_embed_frameworks = true
|
319
|
+
|
320
|
+
phase.add_file_reference(file_ref)
|
321
|
+
phase.dst_subfolder_spec = "10"
|
322
|
+
|
323
|
+
phase.files.each do |file|
|
324
|
+
file.settings = { "ATTRIBUTES" => ["CodeSignOnCopy", "RemoveHeadersOnCopy"] }
|
324
325
|
end
|
325
326
|
end
|
326
327
|
end
|
328
|
+
|
329
|
+
unless has_embed_frameworks
|
330
|
+
embed_phase = lane_context[:target].new_copy_files_build_phase("Embed Frameworks")
|
331
|
+
embed_phase.dst_subfolder_spec = "10"
|
332
|
+
|
333
|
+
embed_phase.add_file_reference(file_ref)
|
334
|
+
|
335
|
+
embed_phase.files.each do |file|
|
336
|
+
file.settings = { "ATTRIBUTES" => ["CodeSignOnCopy", "RemoveHeadersOnCopy"] }
|
337
|
+
end
|
338
|
+
end
|
327
339
|
end
|
328
340
|
lane_context[:target].frameworks_build_phase.add_file_reference(file_ref, true)
|
329
341
|
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.7
|
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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|