Cache result of resource and framework paths

parent c6eee2ed
......@@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
* Cache result of resource and framework paths
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6893](https://github.com/CocoaPods/CocoaPods/pull/6893)
* Ensure source urls are set when spec has subspecs with dependencies
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6888](https://github.com/CocoaPods/CocoaPods/pull/6888)
......
......@@ -188,26 +188,30 @@ module Pod
# input and output paths grouped by config
#
def framework_paths_by_config
framework_paths_by_config = {}
user_build_configurations.keys.each do |config|
relevant_pod_targets = pod_targets.select do |pod_target|
pod_target.include_in_build_config?(target_definition, config)
@framework_paths_by_config ||= begin
framework_paths_by_config = {}
user_build_configurations.keys.each do |config|
relevant_pod_targets = pod_targets.select do |pod_target|
pod_target.include_in_build_config?(target_definition, config)
end
framework_paths_by_config[config] = relevant_pod_targets.flat_map(&:framework_paths)
end
framework_paths_by_config[config] = relevant_pod_targets.flat_map(&:framework_paths)
framework_paths_by_config
end
framework_paths_by_config
end
# @return [Hash{String => Array<String>}] Uniqued Resources grouped by config
#
def resource_paths_by_config
relevant_pod_targets = pod_targets.reject do |pod_target|
pod_target.should_build? && pod_target.requires_frameworks?
end
user_build_configurations.keys.each_with_object({}) do |config, resources_by_config|
resources_by_config[config] = relevant_pod_targets.flat_map do |pod_target|
next [] unless pod_target.include_in_build_config?(target_definition, config)
(pod_target.resource_paths + [bridge_support_file].compact).uniq
@resource_paths_by_config ||= begin
relevant_pod_targets = pod_targets.reject do |pod_target|
pod_target.should_build? && pod_target.requires_frameworks?
end
user_build_configurations.keys.each_with_object({}) do |config, resources_by_config|
resources_by_config[config] = relevant_pod_targets.flat_map do |pod_target|
next [] unless pod_target.include_in_build_config?(target_definition, config)
(pod_target.resource_paths + [bridge_support_file].compact).uniq
end
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment