Commit 58219eca authored by Marius Rackwitz's avatar Marius Rackwitz

[Refactor] Extract #generate_pod_target in Analyzer

parent 83096348
...@@ -219,7 +219,7 @@ module Pod ...@@ -219,7 +219,7 @@ module Pod
end end
end end
generate_pod_targets(target, specs) target.pod_targets = generate_pod_targets(target, specs)
target target
end end
...@@ -240,21 +240,34 @@ module Pod ...@@ -240,21 +240,34 @@ module Pod
specs.select { |s| s.root == spec.root } specs.select { |s| s.root == spec.root }
end.uniq end.uniq
grouped_specs.map do |pod_specs|
generate_pod_target(target, pod_specs)
end
end
# Create a target for each spec group and add it to the aggregate target # Create a target for each spec group and add it to the aggregate target
grouped_specs.each do |pod_specs| #
pod_target = PodTarget.new(pod_specs, target_definition, sandbox) # @param [AggregateTarget] target
# the aggregate target
#
# @param [Array<Specification>] specs
# the specifications of an equal root.
#
# @return [PodTarget]
#
def generate_pod_target(target, pod_specs)
pod_target = PodTarget.new(pod_specs, target.target_definition, sandbox)
pod_target.host_requires_framework |= target.host_requires_framework pod_target.host_requires_framework |= target.host_requires_framework
if config.integrate_targets? if config.integrate_targets?
pod_target.user_build_configurations = target.user_build_configurations pod_target.user_build_configurations = target.user_build_configurations
pod_target.archs = @archs_by_target_def[target_definition] pod_target.archs = @archs_by_target_def[target.target_definition]
else else
pod_target.user_build_configurations = {} pod_target.user_build_configurations = {}
if target_definition.platform.name == :osx if target.platform.name == :osx
pod_target.archs = '$(ARCHS_STANDARD_64_BIT)' pod_target.archs = '$(ARCHS_STANDARD_64_BIT)'
end end
end end
target.pod_targets << pod_target
end
pod_target pod_target
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