Commit 3237d4dd authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7100 from paulb777/sf-resources

Copy resources for static frameworks
parents c3d79897 0e5d87ed
......@@ -24,6 +24,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6953](https://github.com/CocoaPods/CocoaPods/issues/6953)
* Add support for resources in source static library frameworks
[Paul Beusterien](https://github.com/paulb777)
[#7100](https://github.com/CocoaPods/CocoaPods/pull/7100)
##### Bug Fixes
* Fix framework and resources paths caching
......
......@@ -205,7 +205,7 @@ module Pod
def resource_paths_by_config
@resource_paths_by_config ||= begin
relevant_pod_targets = pod_targets.reject do |pod_target|
pod_target.should_build? && pod_target.requires_frameworks?
pod_target.should_build? && pod_target.requires_frameworks? && !pod_target.static_framework?
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|
......
......@@ -150,6 +150,28 @@ module Pod
]
end
it 'checks resource paths are empty for dynamic frameworks' do
@pod_target.stubs(:should_build?).returns(true)
@pod_target.stubs(:requires_frameworks?).returns(true)
@pod_target.stubs(:static_framework?).returns(false)
@pod_target.stubs(:resource_paths).returns(['MyResources.bundle'])
@target.stubs(:bridge_support_file).returns(nil)
resource_paths_by_config = @target.resource_paths_by_config
resource_paths_by_config['Debug'].should.be.empty
resource_paths_by_config['Release'].should.be.empty
end
it 'checks resource paths are included for static frameworks' do
@pod_target.stubs(:should_build?).returns(true)
@pod_target.stubs(:requires_frameworks?).returns(true)
@pod_target.stubs(:static_framework?).returns(true)
@pod_target.stubs(:resource_paths).returns(['MyResources.bundle'])
@target.stubs(:bridge_support_file).returns(nil)
resource_paths_by_config = @target.resource_paths_by_config
resource_paths_by_config['Debug'].should == ['MyResources.bundle']
resource_paths_by_config['Release'].should == ['MyResources.bundle']
end
it 'returns non vendored frameworks by config with different release and debug targets' do
@pod_target_release.stubs(:should_build?).returns(true)
@pod_target_release.stubs(:requires_frameworks?).returns(true)
......
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