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
e14397ee
Commit
e14397ee
authored
Jul 21, 2017
by
Dimitris Koutsogiorgas
Committed by
GitHub
Jul 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6893 from dnkoutso/cache_aggregate_paths
Cache result of resource and framework paths
parents
c6eee2ed
5f8c4f6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
CHANGELOG.md
CHANGELOG.md
+4
-0
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+17
-13
No files found.
CHANGELOG.md
View file @
e14397ee
...
@@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### Bug Fixes
*
Cache result of resource and framework paths
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6893
](
https://github.com/CocoaPods/CocoaPods/pull/6893
)
*
Ensure source urls are set when spec has subspecs with dependencies
*
Ensure source urls are set when spec has subspecs with dependencies
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6888
](
https://github.com/CocoaPods/CocoaPods/pull/6888
)
[
#6888
](
https://github.com/CocoaPods/CocoaPods/pull/6888
)
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
e14397ee
...
@@ -188,26 +188,30 @@ module Pod
...
@@ -188,26 +188,30 @@ module Pod
# input and output paths grouped by config
# input and output paths grouped by config
#
#
def
framework_paths_by_config
def
framework_paths_by_config
framework_paths_by_config
=
{}
@framework_paths_by_config
||=
begin
user_build_configurations
.
keys
.
each
do
|
config
|
framework_paths_by_config
=
{}
relevant_pod_targets
=
pod_targets
.
select
do
|
pod_target
|
user_build_configurations
.
keys
.
each
do
|
config
|
pod_target
.
include_in_build_config?
(
target_definition
,
config
)
relevant_pod_targets
=
pod_targets
.
select
do
|
pod_target
|
pod_target
.
include_in_build_config?
(
target_definition
,
config
)
end
framework_paths_by_config
[
config
]
=
relevant_pod_targets
.
flat_map
(
&
:framework_paths
)
end
end
framework_paths_by_config
[
config
]
=
relevant_pod_targets
.
flat_map
(
&
:framework_paths
)
framework_paths_by_config
end
end
framework_paths_by_config
end
end
# @return [Hash{String => Array<String>}] Uniqued Resources grouped by config
# @return [Hash{String => Array<String>}] Uniqued Resources grouped by config
#
#
def
resource_paths_by_config
def
resource_paths_by_config
relevant_pod_targets
=
pod_targets
.
reject
do
|
pod_target
|
@resource_paths_by_config
||=
begin
pod_target
.
should_build?
&&
pod_target
.
requires_frameworks?
relevant_pod_targets
=
pod_targets
.
reject
do
|
pod_target
|
end
pod_target
.
should_build?
&&
pod_target
.
requires_frameworks?
user_build_configurations
.
keys
.
each_with_object
({})
do
|
config
,
resources_by_config
|
end
resources_by_config
[
config
]
=
relevant_pod_targets
.
flat_map
do
|
pod_target
|
user_build_configurations
.
keys
.
each_with_object
({})
do
|
config
,
resources_by_config
|
next
[]
unless
pod_target
.
include_in_build_config?
(
target_definition
,
config
)
resources_by_config
[
config
]
=
relevant_pod_targets
.
flat_map
do
|
pod_target
|
(
pod_target
.
resource_paths
+
[
bridge_support_file
].
compact
).
uniq
next
[]
unless
pod_target
.
include_in_build_config?
(
target_definition
,
config
)
(
pod_target
.
resource_paths
+
[
bridge_support_file
].
compact
).
uniq
end
end
end
end
end
end
end
...
...
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