cocoapods-tdfire-binary 0.1.8 → 0.1.9

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: 657b1c465e3ae04542e623c91b8d25e956461761
4
- data.tar.gz: 4036ef11758257d58599ef7b12aaaf8bbfe641dc
3
+ metadata.gz: 679abb6a0182582d48cdaded68919000403f4449
4
+ data.tar.gz: 39bf6fb796ed7cbdc9db9358974b78ff24e32e4e
5
5
  SHA512:
6
- metadata.gz: 709fba2804df01c8676fef64d490ba95f68a132610e841c770d9d99708f6bbfc7336cef8be8e0715bfccf04c0c204bb42568acd63b26b64ea8eb1df0da84eefd
7
- data.tar.gz: 3b2b5d3ebf2d26c5037d139100897bfbe622099962461c47ca6c78d426b65cf00e4325058eb152ba34753e8df41bf287eb050710e5aa0afe2864da8a0b7e89dd
6
+ metadata.gz: 4ad7cd4203a7bb68b04547b3cf166144c6fbe882e4ee0818c2414ae27affd3981872f695cc47c2bf32b60dbe73aa2106c40065970de51be5e4480b5264ac858f
7
+ data.tar.gz: d2abdb1c9e1f216d5547e1cc93602b5a78bfb8ac2a052e54d4b22c12078947066d2ac782724f61cdfb189e09a718ae306eb9514d1ffb9c80d82893032acc9411
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-tdfire-binary (0.1.8)
4
+ cocoapods-tdfire-binary (0.1.9)
5
5
  cocoapods (~> 1.4)
6
6
 
7
7
  GEM
@@ -6,10 +6,12 @@ module Tdfire
6
6
  # attr_accessor :unpublished_pods
7
7
  attr_accessor :use_source_pods
8
8
  attr_reader :printed_pods
9
+ attr_accessor :use_frameworks
9
10
  end
10
11
  # @unpublished_pods = []
11
12
  @use_source_pods = []
12
13
  @printed_pods = []
14
+ @use_frameworks = false
13
15
 
14
16
  def self.real_use_source_pods
15
17
  (@use_source_pods + unpublished_pods).uniq
@@ -1,3 +1,3 @@
1
1
  module CocoapodsTdfireBinary
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -2,7 +2,8 @@ require 'cocoapods-tdfire-binary/binary_state_store'
2
2
  require 'cocoapods-tdfire-binary/source_chain_analyzer'
3
3
 
4
4
  module CocoapodsTdfireBinary
5
-
5
+ include Tdfire
6
+
6
7
  Pod::HooksManager.register('cocoapods-tdfire-binary', :pre_install) do |context, _|
7
8
  first_target_definition = context.podfile.target_definition_list.select{ |d| d.name != 'Pods' }.first
8
9
  development_pod = first_target_definition.name.split('_').first unless first_target_definition.nil?
@@ -16,20 +17,21 @@ module CocoapodsTdfireBinary
16
17
  # 标明未发布的pod,因为未发布pod没有对应的二进制版本,无法下载
17
18
  # 未发布的pod,一定是源码依赖的
18
19
  Pod::UI.section("Tdfire: auto set unpublished pods") do
19
- Tdfire::BinaryStateStore.unpublished_pods = context.podfile.dependencies.select(&:external?).map(&:root_name)
20
+ BinaryStateStore.unpublished_pods = context.podfile.dependencies.select(&:external?).map(&:root_name)
20
21
 
21
- Pod::UI.message "> Tdfire: unpublished pods: #{Tdfire::BinaryStateStore.unpublished_pods.join(', ')}"
22
+ Pod::UI.message "> Tdfire: unpublished pods: #{BinaryStateStore.unpublished_pods.join(', ')}"
22
23
  end
23
24
 
24
25
  # 没有标识use_frameworks!,进行源码依赖需要设置Pod依赖链上,依赖此源码Pod的也进行源码依赖
25
- unless first_target_definition.uses_frameworks?
26
- Pod::UI.section("Tdfire: analyze chain pods depend on use source pods: #{Tdfire::BinaryStateStore.use_source_pods.join(', ')}") do
27
- chain_pods = Tdfire::SourceChainAnalyzer.new(context.podfile).analyze(Tdfire::BinaryStateStore.use_source_pods)
26
+ BinaryStateStore.use_frameworks = first_target_definition.uses_frameworks?
27
+ unless BinaryStateStore.use_frameworks
28
+ Pod::UI.section("Tdfire: analyze chain pods depend on use source pods: #{BinaryStateStore.use_source_pods.join(', ')}") do
29
+ chain_pods = SourceChainAnalyzer.new(context.podfile).analyze(BinaryStateStore.use_source_pods)
28
30
 
29
31
  Pod::UI.message "> Tdfire: find chain pods: #{chain_pods.join(', ')}"
30
32
 
31
- Tdfire::BinaryStateStore.use_source_pods += chain_pods
32
- end unless Tdfire::BinaryStateStore.use_source_pods.empty?
33
+ BinaryStateStore.use_source_pods += chain_pods
34
+ end unless BinaryStateStore.use_source_pods.empty?
33
35
  end
34
36
  end
35
37
 
@@ -55,7 +57,7 @@ module CocoapodsTdfireBinary
55
57
  end
56
58
  end
57
59
 
58
- Pod::UI.puts "Tdfire: all source dependency pods: #{Tdfire::BinaryStateStore.real_use_source_pods.join(', ')}"
59
- Pod::UI.puts "Tdfire: all unpublished pods: #{Tdfire::BinaryStateStore.unpublished_pods.join(', ')}"
60
+ Pod::UI.puts "Tdfire: all source dependency pods: #{BinaryStateStore.real_use_source_pods.join(', ')}"
61
+ Pod::UI.puts "Tdfire: all unpublished pods: #{BinaryStateStore.unpublished_pods.join(', ')}"
60
62
  end
61
63
  end
@@ -15,11 +15,15 @@ module Pod
15
15
 
16
16
  public
17
17
 
18
+ def tdfire_use_frameworks?
19
+ Tdfire::BinaryStateStore.use_frameworks
20
+ end
21
+
18
22
  # 源码依赖配置
19
23
  def tdfire_source(&block)
20
24
  if use_source?
21
25
  if !Tdfire::BinaryStateStore.printed_pods.include?(name)
22
- UI.puts "Source".magenta.bold + " dependecy for " + "#{name} #{version}".green.bold
26
+ UI.message "Source".magenta.bold + " dependecy for " + "#{name} #{version}".green.bold
23
27
  Tdfire::BinaryStateStore.printed_pods << name
24
28
  end
25
29
 
@@ -31,7 +35,7 @@ module Pod
31
35
  def tdfire_binary(&block)
32
36
  if !use_source?
33
37
  if !Tdfire::BinaryStateStore.printed_pods.include?(name)
34
- UI.puts "Binary".cyan.bold + " dependecy for " + "#{name} #{version}".green.bold
38
+ UI.message "Binary".cyan.bold + " dependecy for " + "#{name} #{version}".green.bold
35
39
  Tdfire::BinaryStateStore.printed_pods << name
36
40
  end
37
41
 
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: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - tripleCC