cocoapods-xlbuild 1.0.0 → 1.0.1
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: 88a70a0fd0fecfb97bff88928a5c18b3f5eb9785c44f3c1b77d0fe6a7948be41
|
4
|
+
data.tar.gz: 96246659761524bd8de69b383119e500b055317cb4c980d0639e03db2ab89597
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e5a06edc5b9c0bec004a0f7be2626dba0dbb7148c8912a9bba291e0812a487d1a7ea6b9c8da8725d2b16833189855a156feae5d353666910f79e0b616b50598
|
7
|
+
data.tar.gz: 6f3ecb033fb70f154b566b0a3eb3f3dc9c71253bf0fd71302137a415e7161a085d1f4c2343416fb2d55229d793a7e74f88bd676a230c6f8bbdd1e0700944577b
|
@@ -170,7 +170,7 @@ Pod::HooksManager.register('cocoapods-xlbuild', :pre_install) do |installer_cont
|
|
170
170
|
|
171
171
|
# -- step 2: pod install ---
|
172
172
|
# install
|
173
|
-
Pod::UI.puts "🤖 Pod Install "
|
173
|
+
Pod::UI.puts "🤖 Pod Install "
|
174
174
|
# go on the normal install step ...
|
175
175
|
|
176
176
|
end
|
@@ -178,16 +178,15 @@ end
|
|
178
178
|
## pod 安装依赖的时候会执行install,install的时候会执行run_plugins_post_install_hooks(Prebuildhook了该方法)
|
179
179
|
# 只要有触发install方法就会触发如下的
|
180
180
|
Pod::HooksManager.register('cocoapods-xlbuild', :post_install) do |installer_context|
|
181
|
-
Pod::UI.puts "🤖 Pod Install hook " + Time.new.inspect
|
182
181
|
if Pod::Podfile::DSL.static_binary
|
183
182
|
Pod::UI.puts "🤖 replace_tagert_copy_source_sh " + Time.new.inspect
|
184
183
|
Pod::PrebuildSandbox.replace_tagert_copy_source_sh(installer_context)
|
185
184
|
end
|
186
185
|
|
187
186
|
if !Pod.is_prebuild_stage && Pod::Podfile::DSL.dont_remove_source_code
|
188
|
-
Pod::UI.puts "🤖 pod工程关联引用源码 " + Time.new.inspect
|
189
187
|
require_relative 'reference/reference_source_code'
|
190
188
|
installer_context.refrence_source_code
|
189
|
+
installer_context.adjust_dynamic_framework_dsym
|
191
190
|
end
|
192
191
|
end
|
193
192
|
|
@@ -16,7 +16,6 @@ module Pod
|
|
16
16
|
|
17
17
|
proj_path_new = Pathname.new(sandbox.project_path)
|
18
18
|
|
19
|
-
puts "[HY].沙盒路径:#{sandbox_path}"
|
20
19
|
project = Xcodeproj::Project.open(proj_path)
|
21
20
|
exsited_framework_pod_names.each do |target_name|
|
22
21
|
real_reference("_Prebuild/#{target_name}", project, target_name)
|
@@ -24,7 +23,46 @@ module Pod
|
|
24
23
|
project.save;
|
25
24
|
end
|
26
25
|
|
27
|
-
|
26
|
+
|
27
|
+
# 动态库dsym问题[CP] Copy dSYM
|
28
|
+
def adjust_dynamic_framework_dsym
|
29
|
+
sandbox_path = Pathname.new(sandbox.root).to_s
|
30
|
+
pre_sandbox = Pod::PrebuildSandbox.from_standard_sandbox(sandbox)
|
31
|
+
exsited_framework_pod_names = pre_sandbox.exsited_framework_pod_names || []
|
32
|
+
|
33
|
+
exsited_framework_pod_names.each do |target_name|
|
34
|
+
input_xcfilelist = sandbox_path + "/Target Support Files/" + target_name + "/#{target_name}-copy-dsyms-input-files.xcfilelist"
|
35
|
+
output_xcfilelist = sandbox_path + "/Target Support Files/" + target_name + "/#{target_name}-copy-dsyms-output-files.xcfilelist"
|
36
|
+
remove_duplicated_bcsymbolmap_lines(input_xcfilelist)
|
37
|
+
remove_duplicated_bcsymbolmap_lines(output_xcfilelist)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
#https://github.com/CocoaPods/CocoaPods/issues/10373
|
42
|
+
def remove_duplicated_bcsymbolmap_lines(path)
|
43
|
+
if File.exist?path
|
44
|
+
top_lines = []
|
45
|
+
bcsymbolmap_lines = []
|
46
|
+
for line in File.readlines(path).map { |line| line.strip }
|
47
|
+
if line.include? ".bcsymbolmap"
|
48
|
+
bcsymbolmap_lines.append(line)
|
49
|
+
else
|
50
|
+
#去重
|
51
|
+
if not top_lines.include?line
|
52
|
+
top_lines.append(line)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
final_lines = top_lines + bcsymbolmap_lines.uniq
|
58
|
+
File.open(path, "w+") do |f|
|
59
|
+
f.puts(final_lines)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
private
|
28
66
|
def get_project_name(tageter_name)
|
29
67
|
return "#{tageter_name}.xcodeproj"
|
30
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-xlbuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 林鹏
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 工程静态库编译,提高编译速度.
|
14
14
|
email:
|