cocoapods-freezer 1.0.5 → 1.0.6

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
  SHA1:
3
- metadata.gz: 82900c52c101e1c6f320c5cd431e380edca2e8d4
4
- data.tar.gz: afdb12dc14fc96d2c4b81814e4c24fc3b37669ea
3
+ metadata.gz: beabd9ae3fe3c6b4c2273db5b17720eccb71d74b
4
+ data.tar.gz: 0b488040d271093e925ae2124686a72abfe85ae5
5
5
  SHA512:
6
- metadata.gz: c6c3056f1584a1f2b2565a3153e15cc62b5100dd0036483a1fe00f8786e4db24de3e8e983604346ebc18880216ec7b465174da74528d739776d0e4ec30c197aa
7
- data.tar.gz: dd0ce488ebc951f671c4c87e0c20eb5d9c712024d6b7b37ea66d3d2e3bfa1fdc6d1cd1b734228dc05ac00a4b7b11ee72505d4373ef85ab8447c50e93c1b6cb4e
6
+ metadata.gz: 0546101bc1fc939debfb0521f3d2f9b5e0ccba5807b165f9cc59188fcd9c3bf72578fb4336e042013c733f2676b8c56a44803ed5d855ed6445ec755b98791b35
7
+ data.tar.gz: c2fd2e22ec588ae40bd45ae854c55864ca4d0c5c7cf81cc571545652a36378f786df31eba6d304ed2c5738d9dac0ee96c81f1cb119e36044835c56b1725fa759
data/README_CH.md CHANGED
@@ -30,7 +30,8 @@ $ pod install --user-freezer
30
30
 
31
31
  ## 计划
32
32
 
33
- - 缓存相关
33
+ - 预编译相关
34
+ [] 支持多subspecs编译
34
35
  [] 支持全平台(Platform)、全配置(Configuration)缓存
35
36
  [] 支持Framework(Dynamic\Static)方式构建
36
37
  [] 支持local类型
@@ -56,48 +56,61 @@ module Pod
56
56
  # freeze!
57
57
  specs_for_freezing.each do |spec|
58
58
 
59
+ # subspec not support;
60
+ if spec.subspecs.count > 0
61
+ Pod::UI.puts "`#{spec.name}` can't freeze because it has subspecs!".red
62
+ next
63
+ end
64
+
59
65
  # local not support;
60
66
  if sandbox.local?(spec.name)
61
67
  Pod::UI.puts "`#{spec.name}` can't freeze because it is local!".red
62
68
  next
63
69
  end
64
70
 
65
- # fetch targets of pod in different platform,
71
+ # fetch targets of pod by spec.name
66
72
  pod_targets = installer.pod_targets.select do |target|
67
- target.pod_name == spec.name
73
+ target.root_spec.name == spec.name
68
74
  end || []
69
75
 
70
- # multiplatform not support(just support ios now!)
71
- # todo(ca1md0wn)
72
76
  unless pod_targets.count > 0
73
- Pod::UI.puts "`#{spec.name}` can't freeze because it is multiplatforms!".red
77
+ Pod::UI.puts "`#{spec.name}` can't freeze because it nil!".red
74
78
  next
75
79
  end
76
80
 
77
- # swift not support;
78
- # todo(ca1md0wn)
79
- # build_as_framework not support;
80
- # todo(ca1md0wn)
81
- # should_not_build not support
82
81
  not_support = false
83
82
  pod_targets.each do |target|
83
+ # todo(ca1md0wn)
84
+ # should_not_build not support
84
85
  if !target.should_build?
85
86
  Pod::UI.puts "`#{spec.name}` can't freeze because it should not build!".red
86
87
  not_support = true
87
88
  break
88
89
  end
89
90
 
91
+ # todo(ca1md0wn)
92
+ # swift not support;
90
93
  if target.uses_swift?
91
94
  Pod::UI.puts "`#{spec.name}` can't freeze because it use swift!".red
92
95
  not_support = true
93
96
  break
94
97
  end
95
98
 
99
+ # todo(ca1md0wn)
100
+ # build_as_framework not support;
96
101
  if target.requires_frameworks?
97
102
  Pod::UI.puts "`#{spec.name}` don't support to freeze because it will build as framework!".red
98
103
  not_support = true
99
104
  break
100
105
  end
106
+
107
+ # todo(ca1md0wn)
108
+ # multiplatform not support(just support ios now!)
109
+ if target.platform.name != :ios
110
+ Pod::UI.puts "`#{spec.name}` don't support to freeze because it is not ios!".red
111
+ not_support = true
112
+ break
113
+ end
101
114
  end
102
115
  next if not_support
103
116
 
@@ -1,3 +1,3 @@
1
1
  module CocoapodsFreezer
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -20,7 +20,7 @@ module Pod
20
20
  end
21
21
 
22
22
  def resolve_dependencies_about_freezed
23
- analysis_result.specifications.each do |spec|
23
+ major_specs.each do |spec|
24
24
  next unless Pod::Freezer.shared.freezed_pod?(spec.root.name)
25
25
 
26
26
  targets = pod_targets.select do |target|
@@ -76,12 +76,14 @@ module Pod
76
76
 
77
77
  # no hook when install by freezer
78
78
  if @use_by_freezer || !Pod::Freezer.shared.enable?
79
- hook_resolve_dependecies.bind(self).()
79
+ analyzer = hook_resolve_dependecies.bind(self).()
80
80
  else
81
81
  clean_pods_about_freezed
82
- hook_resolve_dependecies.bind(self).()
82
+ analyzer = hook_resolve_dependecies.bind(self).()
83
83
  resolve_dependencies_about_freezed
84
84
  end
85
+
86
+ analyzer
85
87
  end
86
88
 
87
89
  # hook install_source_of_pod
@@ -48,7 +48,7 @@ module Pod
48
48
  attributes_hash[platform_name]["vendored_frameworks"] = vendors
49
49
  when :static_library then
50
50
  attributes_hash[platform_name]["source_files"] = header_files_in_all_sources_files(platform_name)
51
- vendors = Array.from_attributes(attributes_hash[platform_name]["vendored_frameworks"])
51
+ vendors = Array.from_attributes(attributes_hash[platform_name]["vendored_libraries"])
52
52
  vendors += [product_name]
53
53
  attributes_hash[platform_name]["vendored_libraries"] = vendors
54
54
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-freezer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ca1md0wn