Commit 7c344bdd authored by Marius Rackwitz's avatar Marius Rackwitz

[Refactor] Extract #generate_target from Analyzer#generate_targets

parent ef070a7f
...@@ -180,9 +180,24 @@ module Pod ...@@ -180,9 +180,24 @@ module Pod
def generate_targets def generate_targets
targets = [] targets = []
result.specs_by_target.each do |target_definition, specs| result.specs_by_target.each do |target_definition, specs|
# Setup the aggregate target targets << generate_target(target_definition, specs)
end
targets
end
# Setup the aggregate target for a single user target
#
# @param [TargetDefinition] target_definition
# the target definition for the user target.
#
# @param [Array<Specification>] specs
# the specifications that need to be installed grouped by the
# given target definition.
#
# @return [AggregateTarget]
#
def generate_target(target_definition, specs)
target = AggregateTarget.new(target_definition, sandbox) target = AggregateTarget.new(target_definition, sandbox)
targets << target
if config.integrate_targets? if config.integrate_targets?
project_path = compute_user_project_path(target_definition) project_path = compute_user_project_path(target_definition)
...@@ -224,8 +239,8 @@ module Pod ...@@ -224,8 +239,8 @@ module Pod
end end
target.pod_targets << pod_target target.pod_targets << pod_target
end end
end
targets target
end end
# Generates dependencies that require the specific version of the Pods # Generates dependencies that require the specific version of the Pods
......
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