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
57c793e3
Commit
57c793e3
authored
Aug 28, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Project] Store Pods products inside their group
parent
6dd2debe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
6 deletions
+14
-6
Gemfile.lock
Gemfile.lock
+1
-1
installer.rb
lib/cocoapods/installer.rb
+1
-1
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+8
-2
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+3
-1
No files found.
Gemfile.lock
View file @
57c793e3
...
@@ -17,7 +17,7 @@ GIT
...
@@ -17,7 +17,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
remote: https://github.com/CocoaPods/Xcodeproj.git
revision:
f877729c796fbf275f100d44ab7eb75d9b52c330
revision:
b0c1ee45e5922be4e5a71305bd2c5f8a4ce9f575
branch: paths-refactor
branch: paths-refactor
specs:
specs:
xcodeproj (0.9.0)
xcodeproj (0.9.0)
...
...
lib/cocoapods/installer.rb
View file @
57c793e3
...
@@ -376,7 +376,7 @@ module Pod
...
@@ -376,7 +376,7 @@ module Pod
native_target
=
pods_project
.
targets
.
select
{
|
t
|
t
.
name
==
aggregate_target
.
name
}.
first
native_target
=
pods_project
.
targets
.
select
{
|
t
|
t
.
name
==
aggregate_target
.
name
}.
first
products
=
pods_project
.
products_group
products
=
pods_project
.
products_group
aggregate_target
.
pod_targets
.
each
do
|
pod_target
|
aggregate_target
.
pod_targets
.
each
do
|
pod_target
|
product
=
p
roducts
.
files
.
select
{
|
f
|
f
.
path
==
pod_target
.
product_name
}.
first
product
=
p
od_target
.
target
.
product_reference
native_target
.
frameworks_build_phase
.
add_file_reference
(
product
)
native_target
.
frameworks_build_phase
.
add_file_reference
(
product
)
end
end
end
end
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
57c793e3
...
@@ -13,6 +13,7 @@ module Pod
...
@@ -13,6 +13,7 @@ module Pod
def
install!
def
install!
UI
.
message
"- Installing target `
#{
library
.
name
}
`
#{
library
.
platform
}
"
do
UI
.
message
"- Installing target `
#{
library
.
name
}
`
#{
library
.
platform
}
"
do
add_target
add_target
move_target_product_file_reference
add_files_to_build_phases
add_files_to_build_phases
add_resources_bundle_targets
add_resources_bundle_targets
# create_suport_files_group
# create_suport_files_group
...
@@ -50,6 +51,12 @@ module Pod
...
@@ -50,6 +51,12 @@ module Pod
end
end
end
end
def
move_target_product_file_reference
pod_name
=
library
.
pod_name
group
=
project
.
group_for_spec
(
pod_name
,
:products
)
target
.
product_reference
.
move
(
group
)
end
# Adds the resources of the Pods to the Pods project.
# Adds the resources of the Pods to the Pods project.
#
#
# @note The source files are grouped by Pod and in turn by subspec
# @note The source files are grouped by Pod and in turn by subspec
...
@@ -62,7 +69,7 @@ module Pod
...
@@ -62,7 +69,7 @@ module Pod
library
.
file_accessors
.
each
do
|
file_accessor
|
library
.
file_accessors
.
each
do
|
file_accessor
|
file_accessor
.
resource_bundles
.
each
do
|
bundle_name
,
paths
|
file_accessor
.
resource_bundles
.
each
do
|
bundle_name
,
paths
|
file_references
=
paths
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
file_references
=
paths
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
group
=
project
.
group_for_spec
(
file_accessor
.
spec
.
name
,
:
resource
s
)
group
=
project
.
group_for_spec
(
file_accessor
.
spec
.
name
,
:
product
s
)
product_group
=
project
.
group_for_spec
(
file_accessor
.
spec
.
name
,
:resources
)
product_group
=
project
.
group_for_spec
(
file_accessor
.
spec
.
name
,
:resources
)
bundle_target
=
project
.
new_resources_bundle
(
bundle_name
,
file_accessor
.
spec_consumer
.
platform_name
,
product_group
)
bundle_target
=
project
.
new_resources_bundle
(
bundle_name
,
file_accessor
.
spec_consumer
.
platform_name
,
product_group
)
bundle_target
.
add_resources
(
file_references
)
bundle_target
.
add_resources
(
file_references
)
...
@@ -189,7 +196,6 @@ module Pod
...
@@ -189,7 +196,6 @@ module Pod
def
add_file_to_support_group
(
path
)
def
add_file_to_support_group
(
path
)
pod_name
=
library
.
pod_name
pod_name
=
library
.
pod_name
group
=
project
.
group_for_spec
(
pod_name
,
:support_files
)
group
=
project
.
group_for_spec
(
pod_name
,
:support_files
)
group
.
hierarchy_path
group
.
new_file
(
path
)
group
.
new_file
(
path
)
end
end
...
...
cocoapods-integration-specs
@
67647ced
Subproject commit
3c332e5b09ae00b1ddf42994fe9d8b3d22bdd652
Subproject commit
67647cedb7de5847e4f4fbd8d0ffbc0de4a07471
spec/unit/installer_spec.rb
View file @
57c793e3
...
@@ -397,12 +397,14 @@ module Pod
...
@@ -397,12 +397,14 @@ module Pod
project
=
Xcodeproj
::
Project
.
new
(
'path'
)
project
=
Xcodeproj
::
Project
.
new
(
'path'
)
pods_target
=
project
.
new_target
(
:static_library
,
target
.
name
,
:ios
)
pods_target
=
project
.
new_target
(
:static_library
,
target
.
name
,
:ios
)
native_target
=
project
.
new_target
(
:static_library
,
pod_target
.
name
,
:ios
)
native_target
=
project
.
new_target
(
:static_library
,
pod_target
.
name
,
:ios
)
pod_target
.
target
=
pods_target
@installer
.
stubs
(
:pods_project
).
returns
(
project
)
@installer
.
stubs
(
:pods_project
).
returns
(
project
)
@installer
.
stubs
(
:aggregate_targets
).
returns
([
target
])
@installer
.
stubs
(
:aggregate_targets
).
returns
([
target
])
@installer
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
@installer
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
@installer
.
send
(
:link_aggregate_target
)
@installer
.
send
(
:link_aggregate_target
)
pods_target
.
frameworks_build_phase
.
files
.
map
(
&
:
display_name
).
should
.
include?
(
pod_target
.
product_nam
e
)
pods_target
.
frameworks_build_phase
.
files
.
map
(
&
:
file_ref
).
should
.
include?
(
pod_target
.
target
.
product_referenc
e
)
end
end
it
"integrates the client projects"
do
it
"integrates the client projects"
do
...
...
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