cocoapods-binaryhqp 0.5.1 → 0.5.2
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/.vscode/launch.json +4 -4
- data/README.md +9 -4
- data/lib/cocoapods-binaryhqp/Integration.rb +6 -3
- data/lib/cocoapods-binaryhqp/Prebuild.rb +9 -2
- data/lib/cocoapods-binaryhqp/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: 3adce240c7874c49810940cf90b4f615622eeacfc52c3c13c117684c6bb8a10f
|
4
|
+
data.tar.gz: d5221a0a35c3fb28154066ad68afa77de704b42c170c948706b8dce2c8592c36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8aa7d3e63f10fb203f085cec2bf730840dadc6240c3faca31d836c871c0f83378515e57ad94925ee44b73b3e5d1bf075b5d9e4e686e236f105725825efe1375
|
7
|
+
data.tar.gz: 4de06e2790d19f79d48814787b4393990a75a87a4a46fafcba7192585f3e151f52ad16d64862e272d6551820142a804e9dc2a01b0e4436df9fb172d0b9964ac5
|
data/.vscode/launch.json
CHANGED
@@ -8,10 +8,10 @@
|
|
8
8
|
"useBundler": true,
|
9
9
|
"cwd": "${workspaceRoot}/demo", // pod 命令执行的路径
|
10
10
|
"program": "/usr/local/bin/pod",
|
11
|
-
// "args": ["update",
|
12
|
-
"args": ["install", "--verbose"]
|
13
|
-
// "args": ["install","--hsource"]
|
14
|
-
|
11
|
+
// "args": ["update","--hsource", "--verbose"]// `pod` 命令的参数
|
12
|
+
// "args": ["install", "--verbose"]
|
13
|
+
// "args": ["install","--hsource", "--verbose"]
|
14
|
+
"args":["install", "--help"]
|
15
15
|
}
|
16
16
|
]
|
17
17
|
}
|
data/README.md
CHANGED
@@ -33,16 +33,17 @@ Then in the flowing normal install process, we hook the integration functions to
|
|
33
33
|
|
34
34
|
## Installation
|
35
35
|
|
36
|
-
##
|
37
|
-
|
36
|
+
## 安装方法
|
37
|
+
|
38
|
+
sudo gem install cocoapods-binaryhqp
|
39
|
+
|
38
40
|
|
39
41
|
## Usage
|
40
42
|
|
41
43
|
``` ruby
|
42
|
-
plugin 'cocoapods-
|
44
|
+
plugin 'cocoapods-binaryhqp'
|
43
45
|
|
44
46
|
use_frameworks!
|
45
|
-
# all_binary!
|
46
47
|
|
47
48
|
target "HP" do
|
48
49
|
pod "ExpectoPatronum", :binary => true
|
@@ -55,6 +56,10 @@ end
|
|
55
56
|
|
56
57
|
**Note**: cocoapods-binary require `use_frameworks!`. If your worry about the boot time and other problems introduced by dynamic framework, static framework is a good choice. Another [plugin](https://github.com/leavez/cocoapods-static-swift-framework) made by me to make all pods static frameworks is recommended.
|
57
58
|
|
59
|
+
## 全部使用源码
|
60
|
+
- pod install --hsource
|
61
|
+
|
62
|
+
|
58
63
|
#### Options
|
59
64
|
|
60
65
|
If you want to disable binary for a specific pod when using `all_binary!`, place a `:binary => false` to it.
|
@@ -214,9 +214,12 @@ module Pod
|
|
214
214
|
# https://github.com/leavez/cocoapods-binary/issues/29
|
215
215
|
if spec.attributes_hash["resource_bundles"]
|
216
216
|
bundle_names = spec.attributes_hash["resource_bundles"].keys
|
217
|
-
|
218
|
-
|
219
|
-
|
217
|
+
# 只对动态库处理,静态库由mainTarget处理resource_bundles,静态库不能清空resource_bundles
|
218
|
+
if not targets.first.build_as_static_framework?
|
219
|
+
spec.attributes_hash["resource_bundles"] = nil
|
220
|
+
spec.attributes_hash["resources"] ||= []
|
221
|
+
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
|
222
|
+
end
|
220
223
|
end
|
221
224
|
|
222
225
|
# to avoid the warning of missing license
|
@@ -257,10 +257,17 @@ module Pod
|
|
257
257
|
end
|
258
258
|
end
|
259
259
|
raise "Wrong type: #{resources}" unless resources.kind_of? Array
|
260
|
-
|
260
|
+
# resource : ${PODS_ROOT}
|
261
|
+
# resource_bundles : ${PODS_CONFIGURATION_BUILD_DIR},不做处理
|
261
262
|
path_objects = resources.map do |path|
|
263
|
+
prebuild_real_path = (path.gsub('${PODS_ROOT}', sandbox.root.to_s) if path.start_with? '${PODS_ROOT}')|| ""
|
264
|
+
real_file_path = framework_path + File.basename(path)
|
265
|
+
if Pathname.new(prebuild_real_path).exist?
|
266
|
+
# 静态库的resource,拷贝至framework目录下
|
267
|
+
FileUtils.cp_r(prebuild_real_path, real_file_path, :remove_destination => true)
|
268
|
+
end
|
262
269
|
object = Prebuild::Passer::ResourcePath.new
|
263
|
-
object.real_file_path =
|
270
|
+
object.real_file_path = real_file_path
|
264
271
|
object.target_file_path = path.gsub('${PODS_ROOT}', standard_sandbox_path.to_s) if path.start_with? '${PODS_ROOT}'
|
265
272
|
object.target_file_path = path.gsub("${PODS_CONFIGURATION_BUILD_DIR}", standard_sandbox_path.to_s) if path.start_with? "${PODS_CONFIGURATION_BUILD_DIR}"
|
266
273
|
object
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-binaryhqp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leavez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|