cocoapods-tdfire-binary 1.2.2 → 1.2.3

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
  SHA1:
3
- metadata.gz: 45829ae42e2a0f6c412b2cf810af6f003b9a41e3
4
- data.tar.gz: 8f5a58fa5f96f30572af33628d43ef3a6c4c3aee
3
+ metadata.gz: acd61a8fc27d59b7ae852462154207384ff601b4
4
+ data.tar.gz: fa102856a43da8b0df1c36728587cf8190bc546d
5
5
  SHA512:
6
- metadata.gz: ef3864030787c1e79cea783b4191a4ec78c0b1009ad4b7569efa77fbbd075f2254e7e8c6fb57820bae954251e6312e33650df143c4182fad24a53c19f8fd2ad1
7
- data.tar.gz: bc6bf5177615471d48fdae5b079bced6592714ed2c36f162af7fbbadbf8cf958568991cb273a28a369c9e30d52b5c6135c3432dbcdbdc94299df55a3b84c7aef
6
+ metadata.gz: 61b5e196df25b38f14111abb2cf9e061d91f621a0838e14d970a28769c782b0c9f6fa8a99e1c39b4edb36cecf8600a60a6bc2a08ac41e979646eeee752cb615e
7
+ data.tar.gz: fc78624a2262aae4038e4de31dd3911fbba73f176c87218528fa3ddc48a1939cdffe135e0fdf11385c4e013af7ea42f832db7235910716e51634290a4db1bbbc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-tdfire-binary (1.2.2)
4
+ cocoapods-tdfire-binary (1.2.3)
5
5
  cocoapods (~> 1.2)
6
6
  cocoapods-packager (~> 1.5.0)
7
7
 
@@ -16,7 +16,11 @@ module Pod
16
16
  if cleaner.no_binary_specs.any?
17
17
  pods = cleaner.no_binary_specs.map { |s| s.root.name }
18
18
  Pod::Tdfire::BinaryStateStore.use_source_pods += pods
19
- UI.warn "Tdfire: 以下组件没有二进制版本,将强制使用源码依赖,添加以下代码至Podfile规避此警告: tdfire_use_source_pods #{pods}"
19
+ UI.warn "Tdfire: 以下组件没有二进制版本,将强制使用源码依赖,添加以下代码至Podfile规避此警告: tdfire_use_source_pods #{pods}"
20
+
21
+ # 在这个时间点设置 use_source_pods ,实际上并不会生效,因为 analysis_result 已经生成,依赖关系不会改变
22
+ # 所以这里强制进行第二次分析,更新 analysis_result
23
+ old_resolve_dependencies.bind(self).call()
20
24
  end
21
25
  end
22
26
  end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsTdfireBinary
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.3"
3
3
  end
@@ -4,7 +4,6 @@ require 'colored2'
4
4
 
5
5
  module Pod
6
6
  class Specification
7
-
8
7
  def tdfire_refactor
9
8
  @refactor ||= Pod::Tdfire::BinarySpecificationRefactor.new(self)
10
9
  end
@@ -20,6 +19,8 @@ module Pod
20
19
 
21
20
  # 源码依赖配置
22
21
  def tdfire_source(configurator)
22
+ tdfire_set_binary_strategy_flag
23
+
23
24
  if tdfire_use_source?
24
25
  if !Pod::Tdfire::BinaryStateStore.printed_pods.include?(root.name)
25
26
  UI.message "Source".magenta.bold + " dependecy for " + "#{root.name} #{version}".green.bold
@@ -34,6 +35,8 @@ module Pod
34
35
 
35
36
  # 二进制依赖配置
36
37
  def tdfire_binary(configurator, &block)
38
+ tdfire_set_binary_strategy_flag
39
+
37
40
  if !tdfire_use_source?
38
41
  if !Pod::Tdfire::BinaryStateStore.printed_pods.include?(root.name)
39
42
  UI.message "Binary".cyan.bold + " dependecy for " + "#{root.name} #{version}".green.bold
@@ -59,6 +62,8 @@ module Pod
59
62
 
60
63
  # 配置二进制文件下载、cache 住解压好的 framework
61
64
  def tdfire_set_binary_download_configurations
65
+ tdfire_set_binary_strategy_flag
66
+
62
67
  tdfire_refactor.set_preserve_paths(tdfire_reference_spec)
63
68
 
64
69
  # 没有发布的pod,没有二进制版本,不进行下载配置
@@ -71,14 +76,24 @@ module Pod
71
76
  end
72
77
 
73
78
  def tdfire_use_source?
74
- ((!Pod::Tdfire::BinaryStateStore.force_use_binary? &&
79
+ (((!Pod::Tdfire::BinaryStateStore.force_use_binary? &&
75
80
  (!Pod::Tdfire::BinaryStateStore.use_binary? || Pod::Tdfire::BinaryStateStore.real_use_source_pods.include?(root.name))) ||
76
81
  Pod::Tdfire::BinaryStateStore.force_use_source?) &&
77
- (Pod::Tdfire::BinaryStateStore.lib_lint_binary_pod != root.name)
82
+ (Pod::Tdfire::BinaryStateStore.lib_lint_binary_pod != root.name)) ||
83
+ !tdfire_had_set_binary_strategy
78
84
  end
79
85
 
80
86
  private
81
87
 
88
+ # 没有配置二进制策略的,使用源码依赖
89
+ def tdfire_had_set_binary_strategy
90
+ @tdfire_binary_strategy_flag || false
91
+ end
92
+
93
+ def tdfire_set_binary_strategy_flag
94
+ @tdfire_binary_strategy_flag = true
95
+ end
96
+
82
97
  def tdfire_reference_spec
83
98
  @tdfire_reference_spec || self
84
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-tdfire-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - tripleCC