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
15090a45
Commit
15090a45
authored
Jan 31, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TargetIntegrator] Remove empty script phases from user target
parent
c2cab609
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+17
-6
No files found.
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
15090a45
...
@@ -119,6 +119,17 @@ module Pod
...
@@ -119,6 +119,17 @@ module Pod
phase
.
output_paths
=
output_paths
phase
.
output_paths
=
output_paths
end
end
# Delete a 'Copy Pods Resources' script phase if present
#
# @param [PBXNativeTarget] native_target
# The native target to remove the script phase from.
#
def
remove_copy_resources_script_phase_from_target
(
native_target
)
build_phase
=
native_target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
&&
bp
.
name
.
end_with?
(
COPY_PODS_RESOURCES_PHASE_NAME
)
}
return
unless
build_phase
.
present?
native_target
.
build_phases
.
delete
(
build_phase
)
end
# Creates or update a shell script build phase for the given target.
# Creates or update a shell script build phase for the given target.
#
#
# @param [PBXNativeTarget] native_target
# @param [PBXNativeTarget] native_target
...
@@ -292,9 +303,9 @@ module Pod
...
@@ -292,9 +303,9 @@ module Pod
native_targets
.
each
do
|
native_target
|
native_targets
.
each
do
|
native_target
|
script_path
=
target
.
copy_resources_script_relative_path
script_path
=
target
.
copy_resources_script_relative_path
resource_paths_by_config
=
target
.
resource_paths_by_config
resource_paths_by_config
=
target
.
resource_paths_by_config
i
nput_paths
=
[]
i
f
resource_paths_by_config
.
values
.
all?
(
&
:empty?
)
output_paths
=
[]
TargetIntegrator
.
remove_copy_resources_script_phase_from_target
(
native_target
)
unless
resource_paths_by_config
.
values
.
all?
(
&
:empty?
)
else
resource_paths_flattened
=
resource_paths_by_config
.
values
.
flatten
.
uniq
resource_paths_flattened
=
resource_paths_by_config
.
values
.
flatten
.
uniq
input_paths
=
[
target
.
copy_resources_script_relative_path
,
*
resource_paths_flattened
]
input_paths
=
[
target
.
copy_resources_script_relative_path
,
*
resource_paths_flattened
]
# convert input paths to output paths according to extensions
# convert input paths to output paths according to extensions
...
@@ -332,9 +343,9 @@ module Pod
...
@@ -332,9 +343,9 @@ module Pod
native_targets_to_embed_in
.
each
do
|
native_target
|
native_targets_to_embed_in
.
each
do
|
native_target
|
script_path
=
target
.
embed_frameworks_script_relative_path
script_path
=
target
.
embed_frameworks_script_relative_path
framework_paths_by_config
=
target
.
framework_paths_by_config
.
values
.
flatten
.
uniq
framework_paths_by_config
=
target
.
framework_paths_by_config
.
values
.
flatten
.
uniq
i
nput_paths
=
[]
i
f
framework_paths_by_config
.
all?
(
&
:empty?
)
output_paths
=
[]
TargetIntegrator
.
remove_embed_frameworks_script_phase_from_target
(
native_target
)
unless
framework_paths_by_config
.
all?
(
&
:empty?
)
else
input_paths
=
[
target
.
embed_frameworks_script_relative_path
,
*
framework_paths_by_config
.
map
{
|
fw
|
[
fw
[
:input_path
],
fw
[
:dsym_input_path
]]
}.
flatten
.
compact
]
input_paths
=
[
target
.
embed_frameworks_script_relative_path
,
*
framework_paths_by_config
.
map
{
|
fw
|
[
fw
[
:input_path
],
fw
[
:dsym_input_path
]]
}.
flatten
.
compact
]
output_paths
=
framework_paths_by_config
.
map
{
|
fw
|
[
fw
[
:output_path
],
fw
[
:dsym_output_path
]]
}.
flatten
.
compact
.
uniq
output_paths
=
framework_paths_by_config
.
map
{
|
fw
|
[
fw
[
:output_path
],
fw
[
:dsym_output_path
]]
}.
flatten
.
compact
.
uniq
TargetIntegrator
.
validate_input_output_path_limit
(
input_paths
,
output_paths
)
TargetIntegrator
.
validate_input_output_path_limit
(
input_paths
,
output_paths
)
...
...
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