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
6baa574a
Commit
6baa574a
authored
Dec 10, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link the pod targets among each other in Xcode
parent
2c034e12
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
15 deletions
+12
-15
private_pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
+0
-2
installer.rb
lib/cocoapods/installer.rb
+7
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+0
-7
installer_spec.rb
spec/unit/installer_spec.rb
+5
-1
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+0
-5
No files found.
lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
View file @
6baa574a
...
@@ -58,12 +58,10 @@ module Pod
...
@@ -58,12 +58,10 @@ module Pod
}
}
if
target
.
requires_frameworks?
if
target
.
requires_frameworks?
dependencies
=
target
.
module_dependencies
.
reject
{
|
dep
|
dep
==
target
.
product_module_name
}
build_settings
=
{
build_settings
=
{
'PODS_FRAMEWORK_BUILD_PATH'
=>
target
.
configuration_build_dir
,
'PODS_FRAMEWORK_BUILD_PATH'
=>
target
.
configuration_build_dir
,
'CONFIGURATION_BUILD_DIR'
=>
'$PODS_FRAMEWORK_BUILD_PATH'
,
'CONFIGURATION_BUILD_DIR'
=>
'$PODS_FRAMEWORK_BUILD_PATH'
,
'FRAMEWORK_SEARCH_PATHS'
=>
'"$PODS_FRAMEWORK_BUILD_PATH"'
,
'FRAMEWORK_SEARCH_PATHS'
=>
'"$PODS_FRAMEWORK_BUILD_PATH"'
,
'OTHER_LDFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
dependencies
,
'-framework'
)
}
}
config
.
merge!
(
build_settings
)
config
.
merge!
(
build_settings
)
end
end
...
...
lib/cocoapods/installer.rb
View file @
6baa574a
...
@@ -450,6 +450,7 @@ module Pod
...
@@ -450,6 +450,7 @@ module Pod
# @return [void]
# @return [void]
#
#
def
set_target_dependencies
def
set_target_dependencies
frameworks_group
=
pods_project
.
frameworks_group
aggregate_targets
.
each
do
|
aggregate_target
|
aggregate_targets
.
each
do
|
aggregate_target
|
aggregate_target
.
pod_targets
.
each
do
|
pod_target
|
aggregate_target
.
pod_targets
.
each
do
|
pod_target
|
unless
pod_target
.
should_build?
unless
pod_target
.
should_build?
...
@@ -470,6 +471,12 @@ module Pod
...
@@ -470,6 +471,12 @@ module Pod
puts
"[BUG] DEP:
#{
dep
}
"
puts
"[BUG] DEP:
#{
dep
}
"
end
end
pod_target
.
native_target
.
add_dependency
(
pod_dependency_target
.
native_target
)
pod_target
.
native_target
.
add_dependency
(
pod_dependency_target
.
native_target
)
if
pod_target
.
requires_frameworks?
product_ref
=
frameworks_group
.
files
.
find
{
|
f
|
f
.
path
==
pod_dep_target
.
product_name
}
||
frameworks_group
.
new_product_ref_for_target
(
pod_dependency_target
.
product_basename
,
pod_dependency_target
.
product_type
)
pod_target
.
native_target
.
frameworks_build_phase
.
add_file_reference
(
product_ref
)
end
end
end
end
end
end
end
...
...
lib/cocoapods/target/pod_target.rb
View file @
6baa574a
...
@@ -91,13 +91,6 @@ module Pod
...
@@ -91,13 +91,6 @@ module Pod
end
.
flatten
end
.
flatten
end
end
# @return [Array<String>] The module names of the Pods on which this target
# depends.
#
def
module_dependencies
dependencies
.
map
{
|
dep_name
|
c99ext_identifier
(
dep_name
)
}
end
# Checks if the target should be included in the build configuration with
# Checks if the target should be included in the build configuration with
# the given name.
# the given name.
#
#
...
...
spec/unit/installer_spec.rb
View file @
6baa574a
...
@@ -75,6 +75,7 @@ module Pod
...
@@ -75,6 +75,7 @@ module Pod
@installer
.
stubs
(
:run_pre_install_hooks
)
@installer
.
stubs
(
:run_pre_install_hooks
)
@installer
.
stubs
(
:install_file_references
)
@installer
.
stubs
(
:install_file_references
)
@installer
.
stubs
(
:install_libraries
)
@installer
.
stubs
(
:install_libraries
)
@installer
.
stubs
(
:set_target_dependencies
)
@installer
.
stubs
(
:write_lockfiles
)
@installer
.
stubs
(
:write_lockfiles
)
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
unstub
(
:generate_pods_project
)
@installer
.
unstub
(
:generate_pods_project
)
...
@@ -417,9 +418,12 @@ module Pod
...
@@ -417,9 +418,12 @@ module Pod
pod_target
.
stubs
(
:should_build?
=>
false
)
pod_target
.
stubs
(
:should_build?
=>
false
)
target
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
target
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
mock_target
=
mock
mock_target
=
mock
(
'PodNativeTarget'
)
mock_target
.
expects
(
:add_dependency
).
with
(
'dummy'
)
mock_target
.
expects
(
:add_dependency
).
with
(
'dummy'
)
mock_project
=
mock
(
'PodsProject'
,
:frameworks_group
=>
mock
(
'FrameworksGroup'
))
@installer
.
stubs
(
:pods_project
).
returns
(
mock_project
)
target
.
stubs
(
:native_target
).
returns
(
mock_target
)
target
.
stubs
(
:native_target
).
returns
(
mock_target
)
target
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
target
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
@installer
.
stubs
(
:aggregate_targets
).
returns
([
target
])
@installer
.
stubs
(
:aggregate_targets
).
returns
([
target
])
...
...
spec/unit/target/pod_target_spec.rb
View file @
6baa574a
...
@@ -38,11 +38,6 @@ module Pod
...
@@ -38,11 +38,6 @@ module Pod
@pod_target
.
dependencies
.
should
==
[
'monkey'
]
@pod_target
.
dependencies
.
should
==
[
'monkey'
]
end
end
it
'returns the name of the modules of the Pods on which this target depends'
do
@pod_target
.
stubs
(
:dependencies
).
returns
([
'human'
,
'M!lk'
,
'3xP-Blender'
])
@pod_target
.
module_dependencies
.
should
==
%w(human M_lk _3xP_Blender)
end
it
'returns whether it is whitelisted in a build configuration'
do
it
'returns whether it is whitelisted in a build configuration'
do
@target_definition
.
store_pod
(
'BananaLib'
)
@target_definition
.
store_pod
(
'BananaLib'
)
@target_definition
.
whitelist_pod_for_configuration
(
'BananaLib'
,
'debug'
)
@target_definition
.
whitelist_pod_for_configuration
(
'BananaLib'
,
'debug'
)
...
...
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