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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 679abb6a0182582d48cdaded68919000403f4449
|
4
|
+
data.tar.gz: 39bf6fb796ed7cbdc9db9358974b78ff24e32e4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ad7cd4203a7bb68b04547b3cf166144c6fbe882e4ee0818c2414ae27affd3981872f695cc47c2bf32b60dbe73aa2106c40065970de51be5e4480b5264ac858f
|
7
|
+
data.tar.gz: d2abdb1c9e1f216d5547e1cc93602b5a78bfb8ac2a052e54d4b22c12078947066d2ac782724f61cdfb189e09a718ae306eb9514d1ffb9c80d82893032acc9411
|
data/Gemfile.lock
CHANGED
@@ -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
|
@@ -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
|
-
|
20
|
+
BinaryStateStore.unpublished_pods = context.podfile.dependencies.select(&:external?).map(&:root_name)
|
20
21
|
|
21
|
-
Pod::UI.message "> Tdfire: unpublished pods: #{
|
22
|
+
Pod::UI.message "> Tdfire: unpublished pods: #{BinaryStateStore.unpublished_pods.join(', ')}"
|
22
23
|
end
|
23
24
|
|
24
25
|
# 没有标识use_frameworks!,进行源码依赖需要设置Pod依赖链上,依赖此源码Pod的也进行源码依赖
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
32
|
-
end unless
|
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: #{
|
59
|
-
Pod::UI.puts "Tdfire: all unpublished pods: #{
|
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.
|
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.
|
38
|
+
UI.message "Binary".cyan.bold + " dependecy for " + "#{name} #{version}".green.bold
|
35
39
|
Tdfire::BinaryStateStore.printed_pods << name
|
36
40
|
end
|
37
41
|
|