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
68b1552f
Commit
68b1552f
authored
Apr 07, 2018
by
Paul Beusterien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review feedback
parent
7212de81
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
pod_target.rb
lib/cocoapods/target/pod_target.rb
+4
-8
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+1
-1
No files found.
lib/cocoapods/target/pod_target.rb
View file @
68b1552f
...
@@ -600,11 +600,7 @@ module Pod
...
@@ -600,11 +600,7 @@ module Pod
dependent_targets
=
recursive_dependent_targets
dependent_targets
=
recursive_dependent_targets
dependent_targets
+=
recursive_test_dependent_targets
if
include_test_dependent_targets
dependent_targets
+=
recursive_test_dependent_targets
if
include_test_dependent_targets
dependent_targets
.
each
do
|
dependent_target
|
dependent_targets
.
each
do
|
dependent_target
|
header_search_paths
.
concat
(
sandbox
.
public_headers
.
search_paths
(
platform
,
header_search_paths
.
concat
(
sandbox
.
public_headers
.
search_paths
(
platform
,
dependent_target
.
pod_name
,
defines_module?
&&
dependent_target
.
uses_modular_headers?
(
false
)))
dependent_target
.
pod_name
,
defines_module?
&&
dependent_target
.
uses_modular_headers?
(
false
)
&&
dependent_target
.
spec_consumers
.
none?
(
&
:header_dir
)))
end
end
header_search_paths
.
uniq
header_search_paths
.
uniq
end
end
...
@@ -616,14 +612,14 @@ module Pod
...
@@ -616,14 +612,14 @@ module Pod
# @param [Boolean] only_if_defines_modules
# @param [Boolean] only_if_defines_modules
# whether the use of modular headers should require the target to define a module
# whether the use of modular headers should require the target to define a module
#
#
# @note This must return false when a pod has a `header_mappings_dir`,
# @note This must return false when a pod has a `header_mappings_dir`
or `header_dir`
,
# as that allows the spec to c
ompletely c
ustomize the header structure, and
# as that allows the spec to customize the header structure, and
# therefore it might not be expecting the module name to be prepended
# therefore it might not be expecting the module name to be prepended
# to imports at all.
# to imports at all.
#
#
def
uses_modular_headers?
(
only_if_defines_modules
=
true
)
def
uses_modular_headers?
(
only_if_defines_modules
=
true
)
return
false
if
only_if_defines_modules
&&
!
defines_module?
return
false
if
only_if_defines_modules
&&
!
defines_module?
spec_consumers
.
none?
(
&
:header_mappings_dir
)
spec_consumers
.
none?
(
&
:header_mappings_dir
)
&&
spec_consumers
.
none?
(
&
:header_dir
)
end
end
private
private
...
...
spec/unit/target/pod_target_spec.rb
View file @
68b1552f
...
@@ -326,7 +326,7 @@ module Pod
...
@@ -326,7 +326,7 @@ module Pod
]
]
end
end
it
'returns
the correct header search paths for dependent targets with header_dir se
t'
do
it
'returns
header search path including header_dir from dependen
t'
do
@pod_target
.
build_headers
.
add_search_path
(
'BananaLib'
,
Platform
.
ios
)
@pod_target
.
build_headers
.
add_search_path
(
'BananaLib'
,
Platform
.
ios
)
@pod_target
.
sandbox
.
public_headers
.
add_search_path
(
'BananaLib'
,
Platform
.
ios
)
@pod_target
.
sandbox
.
public_headers
.
add_search_path
(
'BananaLib'
,
Platform
.
ios
)
@pod_target
.
sandbox
.
public_headers
.
add_search_path
(
'monkey'
,
Platform
.
ios
)
@pod_target
.
sandbox
.
public_headers
.
add_search_path
(
'monkey'
,
Platform
.
ios
)
...
...
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