cocoapods-xlbuild 1.1.0 → 1.1.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 +4 -4
- data/lib/cocoapods-xlbuild/Main.rb +52 -0
- data/lib/cocoapods-xlbuild/gem_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfe84969c5bf4aa57c96cca09cfcb42a628f69e836e5e10127378a5084a342c7
|
4
|
+
data.tar.gz: c13a23f3b99456911d876d8f6a4b7de58d9e9c704f32e2d26adf3b7b0442b21c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 633cc3ba7e6eccd7dcb343642d3ef9b07f100a592029befadf334a9f61a68af18399cca0961f281fe1a30d06933754ca0444759d6d26f69c210150eb0f7b310c
|
7
|
+
data.tar.gz: d196bff9a8e17fe7949648db27b6a5737a3c9fc1fd6323e3745151f818d7383b84cb64166d78222ebbf0bbc378a7d02f7e527ffe654a6bcfbee2e5260c718854
|
@@ -94,6 +94,50 @@ module Pod
|
|
94
94
|
self.custom_build_options_simulator = []
|
95
95
|
end
|
96
96
|
end
|
97
|
+
|
98
|
+
class Type
|
99
|
+
class_attr_accessor :pod_flag_file
|
100
|
+
@pod_flag_file = "build.xl"
|
101
|
+
|
102
|
+
def self.frameworks_type
|
103
|
+
is_static_binary = Pod::Podfile::DSL.static_binary
|
104
|
+
frameworks_type = is_static_binary ? "static" : "dynamic"
|
105
|
+
return frameworks_type
|
106
|
+
end
|
107
|
+
|
108
|
+
# 动静态库切换时候需要重新build(删除Pod目录重新构建)
|
109
|
+
def self.adjust_dynamic_static_change_pod(pod_root_path)
|
110
|
+
pod_type_path = pod_root_path+Pod::Type.pod_flag_file
|
111
|
+
if not File.exist?(pod_type_path)
|
112
|
+
FileUtils.remove_dir(pod_root_path)
|
113
|
+
else
|
114
|
+
frameworks_type = Pod::Type.frameworks_type
|
115
|
+
aFile = File.new(pod_type_path, "r")
|
116
|
+
if aFile
|
117
|
+
content = aFile.readlines[0]
|
118
|
+
if not frameworks_type.equal?(content)
|
119
|
+
FileUtils.remove_dir(pod_root_path)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
#构建结束 标记当前打包的是动|静态库
|
128
|
+
def self.adjust_dynamic_static_change_pod_finish(pod_root_path)
|
129
|
+
# 标记状态
|
130
|
+
pod_type_path = pod_root_path+Pod::Type.pod_flag_file
|
131
|
+
if File.exist?(pod_type_path)
|
132
|
+
File.delete(pod_type_path)
|
133
|
+
end
|
134
|
+
|
135
|
+
frameworks_type = Pod::Type.frameworks_type
|
136
|
+
File.open(pod_type_path, "w+") { |f|
|
137
|
+
f.write(frameworks_type)
|
138
|
+
}
|
139
|
+
end
|
140
|
+
end
|
97
141
|
end
|
98
142
|
|
99
143
|
Pod::HooksManager.register('cocoapods-xlbuild', :pre_install) do |installer_context|
|
@@ -148,6 +192,10 @@ Pod::HooksManager.register('cocoapods-xlbuild', :pre_install) do |installer_cont
|
|
148
192
|
#linpeng edit: 修改Pod目录为 Pod/_Prebuild
|
149
193
|
prebuild_sandbox = Pod::PrebuildSandbox.from_standard_sandbox(standard_sandbox)
|
150
194
|
|
195
|
+
# 动|静态库(mach-o type)切换需要重新build(删除Pod目录)
|
196
|
+
pod_root_path = standard_sandbox.root
|
197
|
+
Pod::Type.adjust_dynamic_static_change_pod pod_root_path
|
198
|
+
|
151
199
|
# get the podfile for prebuild
|
152
200
|
prebuild_podfile = Pod::Podfile.from_ruby(podfile.defined_in_file)
|
153
201
|
|
@@ -176,6 +224,10 @@ Pod::HooksManager.register('cocoapods-xlbuild', :pre_install) do |installer_cont
|
|
176
224
|
Pod::Installer.disable_install_complete_message false
|
177
225
|
Pod::UserInterface.warnings = [] # clean the warning in the prebuild step, it's duplicated.
|
178
226
|
|
227
|
+
|
228
|
+
# install完成标记mach-o type
|
229
|
+
Pod::Type.adjust_dynamic_static_change_pod_finish pod_root_path
|
230
|
+
|
179
231
|
# -- step 2: pod install ---
|
180
232
|
# install
|
181
233
|
Pod::UI.puts "🤖 Pod Install "
|
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.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 林鹏
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 工程静态库编译,提高编译速度.
|
14
14
|
email:
|