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
a0ccef9a
Commit
a0ccef9a
authored
Apr 07, 2015
by
AliSoftware
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[xcassets] Removing debug traces
parent
3f54a47d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
15 deletions
+0
-15
user_project_integrator.rb
lib/cocoapods/installer/user_project_integrator.rb
+0
-4
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+0
-11
No files found.
lib/cocoapods/installer/user_project_integrator.rb
View file @
a0ccef9a
...
@@ -130,7 +130,6 @@ module Pod
...
@@ -130,7 +130,6 @@ module Pod
def
clean_deintegrated_targets_resources
(
project
,
target_uuids_to_keep
)
def
clean_deintegrated_targets_resources
(
project
,
target_uuids_to_keep
)
is_dirty
=
false
is_dirty
=
false
TargetIntegrator
.
each_pods_resources
(
project
)
do
|
file_ref
|
TargetIntegrator
.
each_pods_resources
(
project
)
do
|
file_ref
|
puts
"Analyzing Pods/Resources/
#{
file_ref
}
"
file_in_at_least_one_target
=
false
file_in_at_least_one_target
=
false
project
.
targets
.
each
do
|
user_target
|
project
.
targets
.
each
do
|
user_target
|
# Seems like user_target.resources_build_phase.include?(file_ref) does not work as expected here :(
# Seems like user_target.resources_build_phase.include?(file_ref) does not work as expected here :(
...
@@ -140,9 +139,7 @@ module Pod
...
@@ -140,9 +139,7 @@ module Pod
if
target_uuids_to_keep
.
include?
(
user_target
.
uuid
)
if
target_uuids_to_keep
.
include?
(
user_target
.
uuid
)
# This target is one to integrate, the resource will be kept in there
# This target is one to integrate, the resource will be kept in there
file_in_at_least_one_target
=
true
file_in_at_least_one_target
=
true
UI
.
puts
" - Should be kept in for target
#{
user_target
}
"
else
else
UI
.
puts
" - Removing
#{
file_ref
}
from
#{
user_target
}
because target not integrated anymore."
user_target
.
resources_build_phase
.
remove_file_reference
(
file_ref
)
user_target
.
resources_build_phase
.
remove_file_reference
(
file_ref
)
is_dirty
=
true
is_dirty
=
true
end
end
...
@@ -151,7 +148,6 @@ module Pod
...
@@ -151,7 +148,6 @@ module Pod
unless
file_in_at_least_one_target
unless
file_in_at_least_one_target
# TODO: Remove the file_refs in Pods/Resources if they are not linked
# TODO: Remove the file_refs in Pods/Resources if they are not linked
# to any native_target anymore (which can happen after a target deintegration)
# to any native_target anymore (which can happen after a target deintegration)
UI
.
puts
" -> File
#{
file_ref
}
is not in any user target anymore, remove it from the project"
file_ref
.
remove_from_project
file_ref
.
remove_from_project
is_dirty
=
true
is_dirty
=
true
end
end
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
a0ccef9a
...
@@ -138,9 +138,6 @@ module Pod
...
@@ -138,9 +138,6 @@ module Pod
def
add_pods_resources
def
add_pods_resources
dirty
=
false
dirty
=
false
UI
.
puts
"- User targets being integrated:
#{
native_targets
.
map
(
&
:name
).
inspect
}
"
UI
.
puts
"- Pod Targets =
#{
target
.
pod_targets
.
map
(
&
:name
)
}
"
pods_group
=
user_project
[
'Pods'
]
pods_group
=
user_project
[
'Pods'
]
resources_group
=
pods_group
?
pods_group
[
'Resources'
]
:
nil
resources_group
=
pods_group
?
pods_group
[
'Resources'
]
:
nil
# The files already in the target before integration
# The files already in the target before integration
...
@@ -158,7 +155,6 @@ module Pod
...
@@ -158,7 +155,6 @@ module Pod
pod_name
=
pod_target
.
pod_name
pod_name
=
pod_target
.
pod_name
resource_files
=
pod_target
.
file_accessors
.
flat_map
(
&
:resources
)
resource_files
=
pod_target
.
file_accessors
.
flat_map
(
&
:resources
)
resource_files
.
each
do
|
resource_path
|
resource_files
.
each
do
|
resource_path
|
UI
.
puts
" - Adding
#{
resource_path
}
to user project"
relative_path
=
resource_path
.
relative_path_from
(
target
.
client_root
).
to_s
relative_path
=
resource_path
.
relative_path_from
(
target
.
client_root
).
to_s
pods_group
||=
((
dirty
=
true
)
&&
user_project
.
new_group
(
'Pods'
))
pods_group
||=
((
dirty
=
true
)
&&
user_project
.
new_group
(
'Pods'
))
...
@@ -167,7 +163,6 @@ module Pod
...
@@ -167,7 +163,6 @@ module Pod
file_ref
=
pod_subgroup
.
files
.
find
{
|
f
|
f
.
path
==
relative_path
}
file_ref
=
pod_subgroup
.
files
.
find
{
|
f
|
f
.
path
==
relative_path
}
file_ref
||=
(
dirty
=
true
)
&&
pod_subgroup
.
new_file
(
relative_path
)
file_ref
||=
(
dirty
=
true
)
&&
pod_subgroup
.
new_file
(
relative_path
)
UI
.
puts
" - Adding
#{
resource_path
.
basename
}
to targets
#{
native_targets
.
map
(
&
:name
)
}
"
native_targets
.
each
do
|
user_target
|
native_targets
.
each
do
|
user_target
|
refs_to_remove
.
delete
(
file_ref
)
# this file_ref is still needed, don't remove it later
refs_to_remove
.
delete
(
file_ref
)
# this file_ref is still needed, don't remove it later
unless
user_target
.
resources_build_phase
.
include?
(
file_ref
)
unless
user_target
.
resources_build_phase
.
include?
(
file_ref
)
...
@@ -181,16 +176,11 @@ module Pod
...
@@ -181,16 +176,11 @@ module Pod
# Remove the resources no longer in a target
# Remove the resources no longer in a target
refs_to_remove
.
each
do
|
file_ref
|
refs_to_remove
.
each
do
|
file_ref
|
native_targets
.
each
do
|
user_target
|
native_targets
.
each
do
|
user_target
|
UI
.
puts
" - Removing
#{
file_ref
}
from
#{
user_target
}
because it is no longer needed."
user_target
.
resources_build_phase
.
remove_file_reference
(
file_ref
)
user_target
.
resources_build_phase
.
remove_file_reference
(
file_ref
)
dirty
=
true
dirty
=
true
end
end
end
end
# TODO: Change code in FileReferencesInstaller#add_resource to stop adding resources to the Pods.xcodeproj
# TODO: Remove code from Pods-resources.sh (except for *.framework stuff still needed)
UI
.
puts
"==> User project dirty?
#{
dirty
.
inspect
}
"
dirty
dirty
end
end
...
@@ -201,7 +191,6 @@ module Pod
...
@@ -201,7 +191,6 @@ module Pod
def
remove_pods_resources
def
remove_pods_resources
TargetIntegrator
.
each_pods_resources
(
user_project
)
do
|
file_ref
|
TargetIntegrator
.
each_pods_resources
(
user_project
)
do
|
file_ref
|
native_targets
.
each
do
|
user_target
|
native_targets
.
each
do
|
user_target
|
UI
.
puts
" - Removing
#{
file_ref
}
from
#{
user_target
}
because it is no longer needed."
user_target
.
resources_build_phase
.
remove_file_reference
(
file_ref
)
user_target
.
resources_build_phase
.
remove_file_reference
(
file_ref
)
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