[PodTarget] Allow non-deduped targets to be frameworks

parent d897a3da
...@@ -65,6 +65,7 @@ module Pod ...@@ -65,6 +65,7 @@ module Pod
target.native_target = native_target target.native_target = native_target
target.archs = archs target.archs = archs
target.dependent_targets = dependent_targets.flat_map { |pt| pt.scoped(cache) }.select { |pt| pt.target_definitions == [target_definition] } target.dependent_targets = dependent_targets.flat_map { |pt| pt.scoped(cache) }.select { |pt| pt.target_definitions == [target_definition] }
target.host_requires_frameworks = host_requires_frameworks
cache[cache_key] = target cache[cache_key] = target
end end
end end
......
...@@ -332,6 +332,37 @@ module Pod ...@@ -332,6 +332,37 @@ module Pod
Pods-SampleProject/monkey-Pods-SampleProject Pods-SampleProject/monkey-Pods-SampleProject
).sort ).sort
end end
it "doesn't deduplicate targets when deduplication is disabled and using frameworks" do
podfile = Pod::Podfile.new do
install! 'cocoapods', :deduplicate_targets => false
source SpecHelper.test_repo_url
platform :ios, '6.0'
project 'SampleProject/SampleProject'
use_frameworks!
pod 'BananaLib'
target 'SampleProject' do
target 'TestRunner' do
pod 'BananaLib'
end
end
end
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile)
result = analyzer.analyze
result.targets.flat_map { |at| at.pod_targets.map { |pt| "#{at.name}/#{pt.name}" } }.sort.should == %w(
Pods-SampleProject-TestRunner/BananaLib-Pods-SampleProject-TestRunner
Pods-SampleProject-TestRunner/monkey-Pods-SampleProject-TestRunner
Pods-SampleProject/BananaLib-Pods-SampleProject
Pods-SampleProject/monkey-Pods-SampleProject
).sort
result.targets.flat_map { |at| at.pod_targets.map(&:requires_frameworks?) }.uniq.should == [true]
end
end end
it 'generates the integration library appropriately if the installation will not integrate' do it 'generates the integration library appropriately if the installation will not integrate' do
......
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