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
58219eca
Commit
58219eca
authored
Sep 29, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Refactor] Extract #generate_pod_target in Analyzer
parent
83096348
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+20
-7
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
58219eca
...
@@ -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
...
...
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