Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
3237d4dd
Commit
3237d4dd
authored
Oct 05, 2017
by
Dimitris Koutsogiorgas
Committed by
GitHub
Oct 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7100 from paulb777/sf-resources
Copy resources for static frameworks
parents
c3d79897
0e5d87ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
CHANGELOG.md
CHANGELOG.md
+4
-0
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+1
-1
aggregate_target_spec.rb
spec/unit/target/aggregate_target_spec.rb
+22
-0
No files found.
CHANGELOG.md
View file @
3237d4dd
...
...
@@ -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
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
3237d4dd
...
...
@@ -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
|
...
...
spec/unit/target/aggregate_target_spec.rb
View file @
3237d4dd
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment