cocoapods-bb-bin 0.2.7.3 → 0.2.7.4

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: 01c0f26fd0285f0023af5e6b16e4b9985bcab9064fad4120fa8f5d8fd19053f3
4
- data.tar.gz: dd09243520e105bf958c09e47cab79732156724909322c2f4e9826667bdbeea9
3
+ metadata.gz: 80c0429394d3ce85918c28ebcfa8f817aade2bb2309a73a980e447d6af6f48e8
4
+ data.tar.gz: d4c3794d17b0950d9279e460fedc9eb628adf299cfcc5851e95311e8bdefdba8
5
5
  SHA512:
6
- metadata.gz: e25a46ad7fb3d01f4622e92b888088cfb457e2cb34a1da19f7ca1bd753f6dc22ff65ae053ea5937db532983788a6af0e09f9118e2e176595f6f6ce4fc6c2a4e2
7
- data.tar.gz: 96b7354a6c603503d126556528062c40e81de709feccff78dfc195ae2d30fbaed3eb98c546e04f4d9ae98fc9baa150d974448861fc22602963c9f2346581983a
6
+ metadata.gz: 0a78ad44d84637689c249ad3a210ce467c0f2c0c95b9159710f6d621c902d13ef8077b751a124d1d7682083bd8ce019c1c3613b06192285d2d291c004922de5c
7
+ data.tar.gz: c0f9294119b2f5662422c95e7a6073e1c39a010e5a3e41703c0b6050fb6d47420e290cb3f2a25575095c25c5e53f2181b8b41ce5311dec5be647c06dcaa9b8ba
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.2.7.3'
3
+ VERSION = '0.2.7.4'
4
4
  end
5
5
 
6
6
  module Pod
@@ -96,6 +96,8 @@ module Pod
96
96
  specs_by_target = old_resolver_specs_by_target.bind(self).call
97
97
 
98
98
  sources_manager = Config.instance.sources_manager
99
+ binary_source = sources_manager.binary_source
100
+ code_source = sources_manager.code_source
99
101
  use_source_pods = podfile.use_source_pods
100
102
 
101
103
  missing_binary_specs = []
@@ -123,11 +125,10 @@ module Pod
123
125
 
124
126
  # 采用二进制依赖并且不为开发组件
125
127
  use_binary = use_binary_rspecs.include?(rspec)
126
- source = use_binary ? sources_manager.binary_source : sources_manager.code_source
127
-
128
+ source = use_binary ? binary_source : code_source
128
129
  spec_version = rspec.spec.version
129
- # UI.message 'cocoapods-bb-bin 插件'
130
- # UI.message "- 开始处理 #{rspec.spec.name} #{spec_version} 组件."
130
+ # UI.puts 'cocoapods-bb-bin 插件'
131
+ # UI.puts "- 开始处理 #{rspec.spec.name} #{spec_version} 组件."
131
132
 
132
133
  begin
133
134
  # 从新 source 中获取 spec,在bin archive中会异常,因为找不到
@@ -9,25 +9,52 @@ module Pod
9
9
 
10
10
  def initLibEnv(isGenDylib=false)
11
11
  @dylib = isGenDylib
12
+ UI.puts "初始化源环境support dylib:#{isGenDylib}"
12
13
  end
13
14
 
14
15
  # 源码 source
15
16
  def code_source
16
- if @dylib # 动态库
17
+ if supportDylibSource # 动态库
17
18
  source_with_name_or_url(CBin.config.sourceV2_repo_url)
18
19
  else # 静态库
19
20
  source_with_name_or_url(CBin.config.code_repo_url)
20
21
  end
21
22
  end
22
23
 
24
+ # 静态库二进制源
25
+ def static_binary_source
26
+ source_with_name_or_url(CBin.config.binary_repo_url)
27
+ end
28
+ # 动态库二进制源
29
+ def dylib_binary_source
30
+ source_with_name_or_url(CBin.config.dylib_repo_url)
31
+ end
32
+
23
33
  # 二进制 source (区分动态库还是静态库)
24
34
  def binary_source
25
- if @dylib # 动态库
26
- source_with_name_or_url(CBin.config.dylib_repo_url)
27
- else # 静态库
28
- source_with_name_or_url(CBin.config.binary_repo_url)
35
+ return supportDylibSource ? dylib_binary_source : static_binary_source
36
+ end
37
+
38
+ # 是否支持动态库
39
+ def supportDylibSource
40
+ if @dylib
41
+ return true
42
+ else
43
+ # 优先解析podfile中source动态配置是否添加动态库源
44
+ podfile = Pod::Config.instance.podfile
45
+ if podfile
46
+ dylib_source = CBin.config.dylib_repo_url
47
+ podfile.sources.map do |source|
48
+ if source === dylib_source
49
+ UI.puts "切换到动态库源:#{dylib_binary_source}"
50
+ return true
51
+ end
52
+ end
53
+ end
54
+ return false
29
55
  end
30
56
  end
57
+
31
58
  end
32
59
  end
33
60
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7.3
4
+ version: 0.2.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-08 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  requirements: []
209
- rubygems_version: 3.4.14
209
+ rubygems_version: 3.4.19
210
210
  signing_key:
211
211
  specification_version: 4
212
212
  summary: cocoapods-bb-bin is a plugin which helps develpers switching pods between