cocoapods-binaryhqp 0.5.1 → 0.5.2

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: 9078b65c00f0ba6bb4109bdfe336dab613798a27cee5b255a762d1b970b3ed01
4
- data.tar.gz: d330261d46d0e2e0cae3d04d41547a59b19de4005fccf73af95eafc86651beae
3
+ metadata.gz: 3adce240c7874c49810940cf90b4f615622eeacfc52c3c13c117684c6bb8a10f
4
+ data.tar.gz: d5221a0a35c3fb28154066ad68afa77de704b42c170c948706b8dce2c8592c36
5
5
  SHA512:
6
- metadata.gz: 877bac9689db2b312866033f963064d39d66d92b4647ed2239579f7d7576e4d70b6d13578874873cbec331e9dcaa48edf7221ed3e640011eb369fe618636125c
7
- data.tar.gz: 30d0ba5c959fbae12bb906976410988ae1d2331b86cbd4adb6b7de56a590dfe519c75ea444a683e93a29efe53c60a8106dc12e1d49e92666f6762085edac4a81
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", "--verbose","--sources=http://gitlab.9tong.com/ios-group/HQPFoundation/hqpspecs.git"], // `pod` 命令的参数
12
- "args": ["install", "--verbose"]
13
- // "args": ["install","--hsource"]
14
- // "args":["install", "--help"]
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
- sudo gem build cocoapods-binaryhqp.gemspec && sudo gem install cocoapods-binaryhqp-0.4.7.gem
36
+ ## 安装方法
37
+
38
+ sudo gem install cocoapods-binaryhqp
39
+
38
40
 
39
41
  ## Usage
40
42
 
41
43
  ``` ruby
42
- plugin 'cocoapods-binary'
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
- spec.attributes_hash["resource_bundles"] = nil
218
- spec.attributes_hash["resources"] ||= []
219
- spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
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 = framework_path + File.basename(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
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBinaryHqp
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
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.1
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-03 00:00:00.000000000 Z
11
+ date: 2021-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods