cocoapods-mtxx-bin 0.0.8 → 0.0.10

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
  SHA256:
3
- metadata.gz: 00c25aad1e1bb13ef8c88e50faf60801931532128a902ab72d40415c6f74809f
4
- data.tar.gz: 59e39e2c15ea57d12940f89dc13760155a663aeb22ed7077bb6bcc8e0d4c7e43
3
+ metadata.gz: 40602fdc840e2eb27939c1f3eaffb2d008c35ac79834e9388a254b5663138510
4
+ data.tar.gz: bde311b8c960a178b1c033715d60e22281b97a90143602649ed4edff83d5ac51
5
5
  SHA512:
6
- metadata.gz: b6f9e5f92d9a260f67fe3f94ecd695314fcb523defdb9d407a5398be6984c2d1d672cc7a54e47c0d031ee158d91075c8da5a6cc27a9d53c1588fc1cc5a6f639d
7
- data.tar.gz: 3c678a0494d56ac065707adb58470f33ac94590087b9b2957fd901e23dfd1bcd589214ef42ce5df285ed2511d11af1481202f211faffa4628ac5a39f5a42a072
6
+ metadata.gz: 6061d7be0b25cf7270f789cac3fa6984029a47ff4856c769615a96777a9b968b7de071d6eeb857729f15a18126293ff24571722b811e8ef807ac75116cf9a336
7
+ data.tar.gz: 8c1d5822f00a15c3613b4b9bb1a2b23c92e95e478c5e98fee6b92746d3d126c18351f6c64ea11895735995b6843f08b5196ab2e13ffb8a07f0c0a29c3c0cd420
@@ -35,6 +35,7 @@ module Pod
35
35
  @repo_update = argv.flag?('repo-update', false)
36
36
  @full_build = argv.flag?('full-build', false)
37
37
  @base_dir = "#{Pathname.pwd}/build_pods"
38
+ @version_helper = BinHelper.new
38
39
  super
39
40
  end
40
41
 
@@ -187,7 +188,7 @@ module Pod
187
188
  created_pods = []
188
189
  pod_targets.map do |pod_target|
189
190
  begin
190
- version = BinHelper.version(pod_target.pod_name, pod_target.root_spec.version.to_s, @analyze_result.specifications)
191
+ version = @version_helper.version(pod_target.pod_name, pod_target.root_spec.version.to_s, @analyze_result.specifications)
191
192
  # 全量
192
193
  if @full_build
193
194
  # 黑名单
@@ -1,4 +1,5 @@
1
1
  require 'json'
2
+ require 'cocoapods-mtxx-bin/helpers/buildAll/bin_helper'
2
3
 
3
4
  module Pod
4
5
  class Command
@@ -38,6 +39,7 @@ pod bin upload Pod1 1.0.0 Pod1.framework mtxxspecs --spec=Pod1.podspec
38
39
  @file = argv.shift_argument
39
40
  @repo = argv.shift_argument
40
41
  @spec = argv.option('spec', nil)
42
+ @xcode_version = BinHelper.xcode_version
41
43
  super
42
44
  end
43
45
 
@@ -125,7 +127,7 @@ pod bin upload Pod1 1.0.0 Pod1.framework mtxxspecs --spec=Pod1.podspec
125
127
  end
126
128
 
127
129
  def source
128
- url = "#{CBin.config.binary_download_url_str}/#{@name}/#{@version}/#{zip_file_name}"
130
+ url = "#{CBin.config.binary_download_url_str}/#{@xcode_version}/#{@name}/#{@version}/#{zip_file_name}"
129
131
  { http: url, type: 'zip' }
130
132
  end
131
133
 
@@ -2,7 +2,7 @@
2
2
  require 'cocoapods-mtxx-bin/command/bin/init'
3
3
  require 'cocoapods-mtxx-bin/command/bin/archive'
4
4
  require 'cocoapods-mtxx-bin/command/bin/auto'
5
- require 'cocoapods-mtxx-bin/command/bin/code'
5
+ # require 'cocoapods-mtxx-bin/command/bin/code'
6
6
  require 'cocoapods-mtxx-bin/command/bin/update'
7
7
  require 'cocoapods-mtxx-bin/command/bin/install'
8
8
  # require 'cocoapods-mtxx-bin/command/bin/imy'
@@ -1,5 +1,5 @@
1
1
  module CBin
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.10"
3
3
  end
4
4
 
5
5
  module Pod
@@ -5,15 +5,37 @@ module CBin
5
5
  class BinHelper
6
6
  include Pod
7
7
 
8
+ def initialize
9
+ super
10
+ @specs_str_md5_hash = Hash.new
11
+ end
12
+
8
13
  # 二进制版本号(x.y.z.bin[md5前6位])
9
- def self.version(pod_name, original_version, specifications)
10
- specs = specifications.map(&:name).select { |spec|
11
- spec.include?(pod_name) && !spec.include?('/Binary')
12
- }.sort!
13
- xcode_version = `xcodebuild -version`.split(' ').join('')
14
- specs << xcode_version
15
- specs_str = specs.join('')
16
- "#{original_version}.bin#{Digest::MD5.hexdigest(specs_str)[0,6]}"
14
+ def version(pod_name, original_version, specifications)
15
+ # 有缓存从缓存中取,没有则新建
16
+ if @specs_str_md5_hash[pod_name].nil?
17
+ specs = specifications.map(&:name).select { |spec|
18
+ spec.include?(pod_name) && !spec.include?('/Binary')
19
+ }.sort!
20
+ specs << xcode_version
21
+ specs_str = specs.join('')
22
+ specs_str_md5 = Digest::MD5.hexdigest(specs_str)[0,6]
23
+ @specs_str_md5_hash[pod_name] = specs_str_md5
24
+ else
25
+ specs_str_md5 = @specs_str_md5_hash[pod_name]
26
+ end
27
+ "#{original_version}.bin#{specs_str_md5}"
28
+ end
29
+
30
+ def xcode_version
31
+ @xcode_version ||= begin
32
+ `xcodebuild -version`.split(' ').join('')
33
+ end
34
+ end
35
+
36
+ def self.xcode_version
37
+ xcode_version = `xcodebuild -version`.split(' ').join('')
38
+ xcode_version
17
39
  end
18
40
 
19
41
  end
@@ -139,9 +139,14 @@ clean build \
139
139
  -project #{project}
140
140
  BUILD
141
141
  UI.info "#{command}"
142
- `#{command}`
142
+ output = `#{command}`
143
+ # puts output
143
144
  if $CHILD_STATUS.exitstatus != 0
144
145
  UI.info "#{@pod_target}(#{sdk}) 编译失败!".red
146
+ error_log_file = "#{temp_dir}/#{@pod_target}_error.log"
147
+ File.open(error_log_file, "w+") do |f|
148
+ f.write(output)
149
+ end
145
150
  return false
146
151
  end
147
152
  return true
@@ -119,7 +119,7 @@ module CBin
119
119
 
120
120
  def source
121
121
  # url = "http://localhost:8080/frameworks/#{@pod_target.root_spec.module_name}/#{version}/zip"
122
- url = "#{CBin.config.binary_download_url_str}/#{@pod_target.root_spec.module_name}/#{version}/#{@pod_target.root_spec.module_name}.framework_#{version}.zip"
122
+ url = "#{CBin.config.binary_download_url_str}/#{BinHelper.xcode_version}/#{@pod_target.root_spec.module_name}/#{version}/#{@pod_target.root_spec.module_name}.framework_#{version}.zip"
123
123
  { http: url, type: 'zip' }
124
124
  end
125
125
 
@@ -1,4 +1,5 @@
1
1
  require 'json'
2
+ require 'cocoapods-mtxx-bin/helpers/buildAll/bin_helper'
2
3
 
3
4
  module CBin
4
5
  module BuildAll
@@ -22,8 +23,9 @@ module CBin
22
23
  end
23
24
  UI.info "Uploading binary zip file #{@pod_target.root_spec.name} (#{@version || @pod_target.root_spec.version})".yellow do
24
25
  upload_url = CBin.config.binary_upload_url_str
25
- # upload_url = "http://localhost:8080/frameworks"
26
- command = "curl -F \"name=#{@pod_target.product_module_name}\" -F \"version=#{@version || @pod_target.root_spec.version}\" -F \"file=@#{zip_file}\" #{upload_url}"
26
+ # upload_url = "http://localhost:8080/frameworks" xcode_version
27
+ xcode_version = BinHelper.xcode_version
28
+ command = "curl -F \"name=#{@pod_target.product_module_name}\" -F \"version=#{@version || @pod_target.root_spec.version}\" -F \"xcode_version=#{xcode_version}\" -F \"file=@#{zip_file}\" #{upload_url}"
27
29
  UI.info "#{command}"
28
30
  json = `#{command}`
29
31
  UI.info json
@@ -1,11 +1,30 @@
1
1
 
2
-
3
2
  require 'parallel'
4
3
  require 'cocoapods'
5
4
 
6
5
  module Pod
7
6
  class Installer
8
7
  class Analyzer
8
+ alias old_fetch_external_sources fetch_external_sources
9
+ def fetch_external_sources(podfile_state)
10
+ verify_no_pods_with_different_sources!
11
+ deps = dependencies_to_fetch(podfile_state)
12
+ pods = pods_to_fetch(podfile_state)
13
+ return if deps.empty?
14
+ UI.section 'Fetching external sources' do
15
+ if installation_options.install_with_multi_threads
16
+ thread_count = installation_options.multi_threads_count
17
+ Parallel.each(deps.sort, in_threads: thread_count) do |dependency|
18
+ fetch_external_source(dependency, !pods.include?(dependency.root_name))
19
+ end
20
+ else
21
+ deps.sort.each do |dependency|
22
+ fetch_external_source(dependency, !pods.include?(dependency.root_name))
23
+ end
24
+ end
25
+ end
26
+ end
27
+
9
28
  # > 1.6.0
10
29
  # all_specs[dep.name] 为 nil 会崩溃
11
30
  # 主要原因是 all_specs 分析错误
@@ -32,15 +51,16 @@ module Pod
32
51
  #
33
52
  alias old_update_repositories update_repositories
34
53
  def update_repositories
35
- if installation_options.update_source_with_multi_processes
54
+ if installation_options.update_source_with_multi_threads
36
55
  # 并发更新私有源
37
56
  # 这里多线程会导致 pod update 额外输出 --verbose 的内容
38
57
  # 不知道为什么?
39
- Parallel.each(sources.uniq(&:url), in_processes: 4) do |source|
40
- if source.git?
41
- config.sources_manager.update(source.name, true)
58
+ thread_count = installation_options.multi_threads_count
59
+ Parallel.each(sources.uniq(&:url), in_threads: thread_count) do |source|
60
+ if source.updateable?
61
+ sources_manager.update(source.name, true)
42
62
  else
43
- UI.message "Skipping `#{source.name}` update because the repository is not a git source repository."
63
+ UI.message "Skipping `#{source.name}` update because the repository is not an updateable repository."
44
64
  end
45
65
  end
46
66
  @specs_updated = true
@@ -16,10 +16,13 @@ module Pod
16
16
  env_option :warn_for_unsecure_source, false
17
17
 
18
18
  # 是否多线程执行 install_pod_sources
19
- env_option :install_with_multi_threads, false
19
+ env_option :install_with_multi_threads, true
20
20
 
21
21
  # 是否多进程执行 update_repositories
22
- env_option :update_source_with_multi_processes, false
22
+ env_option :update_source_with_multi_threads, false
23
+
24
+ # 并发执行个数
25
+ option :multi_threads_count, 4
23
26
  end
24
27
  end
25
28
  end
@@ -6,6 +6,86 @@ require 'cocoapods-mtxx-bin/native/pod_source_installer'
6
6
 
7
7
  module Pod
8
8
  class Installer
9
+
10
+ def cost_time_hash
11
+ @cost_time_hash ||= begin
12
+ Hash.new
13
+ end
14
+ end
15
+
16
+ # TODO: 不知道为啥无法hook
17
+ # 准备
18
+ alias old_prepare prepare
19
+ def prepare
20
+ start_time = Time.now
21
+ old_prepare
22
+ cost_time_hash['prepare'] = Time.now - start_time
23
+ end
24
+
25
+ # 依赖分析
26
+ alias old_resolve_dependencies resolve_dependencies
27
+ def resolve_dependencies
28
+ start_time = Time.now
29
+ analyzer = old_resolve_dependencies
30
+ cost_time_hash['resolve_dependencies'] = Time.now - start_time
31
+ analyzer
32
+ end
33
+
34
+ # 依赖下载
35
+ alias old_download_dependencies download_dependencies
36
+ def download_dependencies
37
+ start_time = Time.now
38
+ old_download_dependencies
39
+ cost_time_hash['download_dependencies'] = Time.now - start_time
40
+ end
41
+
42
+ # 验证target
43
+ alias old_validate_targets validate_targets
44
+ def validate_targets
45
+ start_time = Time.now
46
+ old_validate_targets
47
+ cost_time_hash['validate_targets'] = Time.now - start_time
48
+ end
49
+
50
+ # 集成
51
+ alias old_integrate integrate
52
+ def integrate
53
+ start_time = Time.now
54
+ old_integrate
55
+ cost_time_hash['integrate'] = Time.now - start_time
56
+ end
57
+
58
+ # 写入lock文件
59
+ alias old_write_lockfiles write_lockfiles
60
+ def write_lockfiles
61
+ start_time = Time.now
62
+ old_write_lockfiles
63
+ cost_time_hash['write_lockfiles'] = Time.now - start_time
64
+ end
65
+
66
+ # 执行post install
67
+ alias old_perform_post_install_actions perform_post_install_actions
68
+ def perform_post_install_actions
69
+ start_time = Time.now
70
+ old_perform_post_install_actions
71
+ cost_time_hash['perform_post_install_actions'] = Time.now - start_time
72
+ # 打印耗时
73
+ print_cost_time
74
+ end
75
+
76
+ # 打印耗时
77
+ def print_cost_time
78
+ UI.title '执行耗时:'.green do
79
+ UI.info '———————————————————————————————————————————————'.green
80
+ UI.info "|#{'Stage'.center(30)}|#{'Time(s)'.center(15)}|".green
81
+ UI.info '———————————————————————————————————————————————'.green
82
+ cost_time_hash.each do |key, value|
83
+ UI.info "|#{key.center(30)}|#{value.to_s.center(15)}|".green
84
+ end
85
+ UI.info '———————————————————————————————————————————————'.green
86
+ end
87
+ end
88
+
9
89
  alias old_create_pod_installer create_pod_installer
10
90
  def create_pod_installer(pod_name)
11
91
  installer = old_create_pod_installer(pod_name)
@@ -16,70 +96,32 @@ module Pod
16
96
  alias old_install_pod_sources install_pod_sources
17
97
  def install_pod_sources
18
98
  if installation_options.install_with_multi_threads
19
- if Pod.match_version?('~> 1.4.0')
20
- install_pod_sources_for_version_in_1_4_0
21
- elsif Pod.match_version?('~> 1.5')
22
- install_pod_sources_for_version_above_1_5_0
23
- else
24
- old_install_pod_sources
25
- end
99
+ install_pod_sources_with_multiple_threads
26
100
  else
27
101
  old_install_pod_sources
28
102
  end
29
103
  end
30
104
 
31
- # rewrite install_pod_sources
32
- def install_pod_sources_for_version_in_1_4_0
105
+ # 多线程下载
106
+ def install_pod_sources_with_multiple_threads
33
107
  @installed_specs = []
34
108
  pods_to_install = sandbox_state.added | sandbox_state.changed
35
- title_options = { verbose_prefix: '-> '.green }
36
- Parallel.each(root_specs.sort_by(&:name), in_threads: 4) do |spec|
37
- if pods_to_install.include?(spec.name)
38
- if sandbox_state.changed.include?(spec.name) && sandbox.manifest
39
- previous = sandbox.manifest.version(spec.name)
40
- title = "Installing #{spec.name} #{spec.version} (was #{previous})"
41
- else
42
- title = "Installing #{spec}"
43
- end
44
- UI.titled_section(title.green, title_options) do
45
- install_source_of_pod(spec.name)
46
- end
47
- else
48
- UI.titled_section("Using #{spec}", title_options) do
49
- create_pod_installer(spec.name)
50
- end
51
- end
52
- end
53
- end
54
-
55
- def install_pod_sources_for_version_above_1_5_0
56
- @installed_specs = []
57
- pods_to_install = sandbox_state.added | sandbox_state.changed
58
- title_options = { verbose_prefix: '-> '.green }
59
- # 多进程下载,多线程时 log 会显著交叉,多进程好点,但是多进程需要利用文件锁对 cache 进行保护
60
- # in_processes: 10
61
- Parallel.each(root_specs.sort_by(&:name), in_threads: 4) do |spec|
109
+ title_options = { :verbose_prefix => '-> '.green }
110
+ thread_count = installation_options.multi_threads_count
111
+ Parallel.each(root_specs.sort_by(&:name), in_threads: thread_count) do |spec|
62
112
  if pods_to_install.include?(spec.name)
63
113
  if sandbox_state.changed.include?(spec.name) && sandbox.manifest
64
114
  current_version = spec.version
65
115
  previous_version = sandbox.manifest.version(spec.name)
66
116
  has_changed_version = current_version != previous_version
67
- current_repo = analysis_result.specs_by_source.detect do |key, values|
68
- break key if values.map(&:name).include?(spec.name)
69
- end
70
- current_repo &&= current_repo.url || current_repo.name
117
+ current_repo = analysis_result.specs_by_source.detect { |key, values| break key if values.map(&:name).include?(spec.name) }
118
+ current_repo &&= (Pod::TrunkSource::TRUNK_REPO_NAME if current_repo.name == Pod::TrunkSource::TRUNK_REPO_NAME) || current_repo.url || current_repo.name
71
119
  previous_spec_repo = sandbox.manifest.spec_repo(spec.name)
72
- has_changed_repo = !previous_spec_repo.nil? && current_repo && (current_repo != previous_spec_repo)
120
+ has_changed_repo = !previous_spec_repo.nil? && current_repo && !current_repo.casecmp(previous_spec_repo).zero?
73
121
  title = "Installing #{spec.name} #{spec.version}"
74
- if has_changed_version && has_changed_repo
75
- title += " (was #{previous_version} and source changed to `#{current_repo}` from `#{previous_spec_repo}`)"
76
- end
77
- if has_changed_version && !has_changed_repo
78
- title += " (was #{previous_version})"
79
- end
80
- if !has_changed_version && has_changed_repo
81
- title += " (source changed to `#{current_repo}` from `#{previous_spec_repo}`)"
82
- end
122
+ title << " (was #{previous_version} and source changed to `#{current_repo}` from `#{previous_spec_repo}`)" if has_changed_version && has_changed_repo
123
+ title << " (was #{previous_version})" if has_changed_version && !has_changed_repo
124
+ title << " (source changed to `#{current_repo}` from `#{previous_spec_repo}`)" if !has_changed_version && has_changed_repo
83
125
  else
84
126
  title = "Installing #{spec}"
85
127
  end
@@ -87,7 +129,7 @@ module Pod
87
129
  install_source_of_pod(spec.name)
88
130
  end
89
131
  else
90
- UI.titled_section("Using #{spec}", title_options) do
132
+ UI.section("Using #{spec}", title_options[:verbose_prefix]) do
91
133
  create_pod_installer(spec.name)
92
134
  end
93
135
  end
@@ -128,7 +170,15 @@ module Pod
128
170
  # old_ensure_matching_version 会移除不是同一个 CocoaPods 版本的组件缓存
129
171
  alias old_ensure_matching_version ensure_matching_version
130
172
  def ensure_matching_version
131
- @@lock.synchronize { old_ensure_matching_version }
173
+ @@lock.synchronize do
174
+ version_file = root + 'VERSION'
175
+ # version = version_file.read.strip if version_file.file?
176
+
177
+ # root.rmtree if version != Pod::VERSION && root.exist?
178
+ root.mkpath
179
+
180
+ version_file.open('w') { |f| f << Pod::VERSION }
181
+ end
132
182
  end
133
183
  end
134
184
  end
@@ -0,0 +1,46 @@
1
+ module Pod
2
+ class Lockfile
3
+ def detect_changes_with_podfile(podfile)
4
+ result = {}
5
+ [:added, :changed, :removed, :unchanged].each { |k| result[k] = [] }
6
+
7
+ installed_deps = {}
8
+ dependencies.each do |dep|
9
+ name = dep.root_name
10
+ installed_deps[name] ||= dependencies_to_lock_pod_named(name)
11
+ end
12
+
13
+ installed_deps = installed_deps.values.flatten(1).group_by(&:name)
14
+
15
+ podfile_dependencies = podfile.dependencies
16
+ podfile_dependencies_by_name = podfile_dependencies.group_by(&:name)
17
+
18
+ all_dep_names = (dependencies + podfile_dependencies).map(&:name).uniq
19
+ all_dep_names.each do |name|
20
+ installed_dep = installed_deps[name]
21
+ installed_dep &&= installed_dep.first
22
+
23
+ # 需要将二进制版本的 specific_version 最后一位去掉,否则二进制下依赖解析很慢
24
+ unless installed_dep.nil?
25
+ installed_dep_version = installed_dep.specific_version.to_s
26
+ if installed_dep_version.include?('bin')
27
+ req_arr = installed_dep_version.split('.').delete_if { |r| r.include?('bin') }
28
+ installed_dep_version = req_arr.join('.')
29
+ installed_dep.specific_version = Pod::Version.create(installed_dep_version)
30
+ end
31
+ end
32
+
33
+ podfile_dep = podfile_dependencies_by_name[name]
34
+ podfile_dep &&= podfile_dep.first
35
+
36
+ if installed_dep.nil? then key = :added
37
+ elsif podfile_dep.nil? then key = :removed
38
+ elsif podfile_dep.compatible?(installed_dep) then key = :unchanged
39
+ else key = :changed
40
+ end
41
+ result[key] << name
42
+ end
43
+ result
44
+ end
45
+ end
46
+ end
@@ -22,10 +22,7 @@ module Pod
22
22
  alias old_add_swift_library_compatibility_header_phase add_swift_library_compatibility_header_phase
23
23
 
24
24
  def add_swift_library_compatibility_header_phase(native_target)
25
- UI.puts "====== swift add_swift_library_compatibility_header_phase ======".yellow
26
25
  if $ARGV[1] == "auto"
27
- UI.puts "====== auto swift add_swift_library_compatibility_header_phase ======".yellow
28
-
29
26
  if custom_module_map
30
27
  raise Informative, 'Using Swift static libraries with custom module maps is currently not supported. ' \
31
28
  "Please build `#{target.label}` as a framework or remove the custom module map."
@@ -80,13 +77,9 @@ module Pod
80
77
  ${BUILT_PRODUCTS_DIR}/Swift\ Compatibility\ Header/${PRODUCT_MODULE_NAME}-Swift.h
81
78
  )
82
79
  else
83
- UI.puts "====== null swift add_swift_library_compatibility_header_phase ======".yellow
84
80
  old_add_swift_library_compatibility_header_phase(native_target)
85
81
  end
86
-
87
82
  end
88
-
89
- #-----------------------------------------------------------------------#
90
83
  end
91
84
  end
92
85
  end
@@ -131,7 +131,9 @@ module Pod
131
131
  value.payload = dep
132
132
  end
133
133
 
134
+ start_time = Time.now
134
135
  @activated = Molinillo::Resolver.new(self, self).resolve(dependencies, locked_dependencies)
136
+ UI.puts "Molinillo resolve耗时:#{Time.now - start_time}".green
135
137
  resolver_specs_by_target
136
138
  rescue Molinillo::ResolverError => e
137
139
  handle_resolver_error(e)
@@ -177,7 +179,7 @@ module Pod
177
179
  use_binary = use_binary_rspecs.include?(rspec)
178
180
  if use_binary
179
181
  source = sources_manager.binary_source
180
- spec_version = CBin::BuildAll::BinHelper.version(rspec.root.name, rspec.spec.version, specifications)
182
+ spec_version = version_helper.version(rspec.root.name, rspec.spec.version, specifications)
181
183
  else
182
184
  # 获取podfile中的source
183
185
  podfile_sources = podfile.sources.uniq.map { |source| sources_manager.source_with_name_or_url(source) }
@@ -189,8 +191,8 @@ module Pod
189
191
 
190
192
  raise Informative, "#{rspec.root.name}(#{spec_version})的podspec未找到,请执行 pod repo update 或添加相应的source源" unless source
191
193
 
192
- UI.message "------------------- 分界线 -----------------------"
193
- UI.message "- 开始处理 #{rspec.spec.name}(#{spec_version}) 组件(#{use_binary ? '二进制' : '源码'})."
194
+ # UI.message "------------------- 分界线 -----------------------"
195
+ # UI.message "- 开始处理 #{rspec.spec.name}(#{spec_version}) 组件(#{use_binary ? '二进制' : '源码'})."
194
196
 
195
197
  begin
196
198
  # 从新 source 中获取 spec,在bin archive中会异常,因为找不到
@@ -219,11 +221,11 @@ module Pod
219
221
  else
220
222
  ResolverSpecification.new(specification, used_by_only, source)
221
223
  end
222
- UI.message "组装新的 rspec ,替换原 rspec #{rspec.root.name} (#{spec_version}) specification = #{specification} #{rspec} "
224
+ # UI.message "组装新的 rspec ,替换原 rspec #{rspec.root.name} (#{spec_version}) specification = #{specification} #{rspec} "
223
225
  rescue Pod::StandardError => e
224
226
  # 没有从新的 source 找到对应版本组件,直接返回原 rspec
225
227
  missing_binary_specs << rspec.spec if use_binary
226
- UI.message "【#{rspec.spec.name} | #{rspec.spec.version}】组件无对应源码版本 , 将采用二进制版本依赖.".red unless use_binary
228
+ # UI.message "【#{rspec.spec.name} | #{rspec.spec.version}】组件无对应源码版本 , 将采用二进制版本依赖.".red unless use_binary
227
229
  rspec
228
230
  end
229
231
  rspec
@@ -232,7 +234,7 @@ module Pod
232
234
 
233
235
  if missing_binary_specs.any?
234
236
  missing_binary_specs.uniq.each do |spec|
235
- UI.message "【#{spec.name} | #{spec.version}】组件无对应二进制版本 , 将采用源码依赖." unless spec.root.source[:type] == 'zip'
237
+ # UI.message "【#{spec.name} | #{spec.version}】组件无对应二进制版本 , 将采用源码依赖." unless spec.root.source[:type] == 'zip'
236
238
  end
237
239
  # 下面的代码为了实现 auto 命令的 --all-make
238
240
  Pod::Command::Bin::Archive.missing_binary_specs(missing_binary_specs)
@@ -263,6 +265,12 @@ module Pod
263
265
  specs_by_target
264
266
  end
265
267
  end
268
+
269
+ def version_helper
270
+ @version_helper ||= begin
271
+ CBin::BuildAll::BinHelper.new
272
+ end
273
+ end
266
274
  end
267
275
 
268
276
  if Pod.match_version?('~> 1.4.0')
@@ -21,5 +21,6 @@ if Pod.match_version?('~> 1.4')
21
21
  require 'cocoapods-mtxx-bin/native/pod_target_installer'
22
22
  require 'cocoapods-mtxx-bin/native/target_validator'
23
23
  require 'cocoapods-mtxx-bin/native/gen'
24
+ require 'cocoapods-mtxx-bin/native/lockfile'
24
25
 
25
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-mtxx-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-28 00:00:00.000000000 Z
11
+ date: 2022-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel
@@ -148,6 +148,7 @@ files:
148
148
  - lib/cocoapods-mtxx-bin/native/installation_options.rb
149
149
  - lib/cocoapods-mtxx-bin/native/installer.rb
150
150
  - lib/cocoapods-mtxx-bin/native/linter.rb
151
+ - lib/cocoapods-mtxx-bin/native/lockfile.rb
151
152
  - lib/cocoapods-mtxx-bin/native/path_source.rb
152
153
  - lib/cocoapods-mtxx-bin/native/pod_source_installer.rb
153
154
  - lib/cocoapods-mtxx-bin/native/pod_target_installer.rb