lib/cocoapods-mtxx-bin/native/resolver.rb in cocoapods-mtxx-bin-0.0.9.1 vs lib/cocoapods-mtxx-bin/native/resolver.rb in cocoapods-mtxx-bin-0.0.10

- old
+ new

@@ -129,11 +129,13 @@ # 重新生成 Pod::Dependency dep = Dependency.new(dep.name, requirements, {:source => dep.podspec_repo, :external_source => dep.external_source}) value.payload = dep end + start_time = Time.now @activated = Molinillo::Resolver.new(self, self).resolve(dependencies, locked_dependencies) + UI.puts "Molinillo resolve耗时:#{Time.now - start_time}".green resolver_specs_by_target rescue Molinillo::ResolverError => e handle_resolver_error(e) end @@ -175,11 +177,11 @@ # 采用二进制依赖并且不为开发组件 use_binary = use_binary_rspecs.include?(rspec) if use_binary source = sources_manager.binary_source - spec_version = CBin::BuildAll::BinHelper.version(rspec.root.name, rspec.spec.version, specifications) + spec_version = version_helper.version(rspec.root.name, rspec.spec.version, specifications) else # 获取podfile中的source podfile_sources = podfile.sources.uniq.map { |source| sources_manager.source_with_name_or_url(source) } source = (sources_manager.code_source_list + podfile_sources).uniq.select do |s| s.search(rspec.root.name) @@ -260,9 +262,15 @@ end end specs_by_target end + end + + def version_helper + @version_helper ||= begin + CBin::BuildAll::BinHelper.new + end end end if Pod.match_version?('~> 1.4.0') # 1.4.0 没有 spec_source