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
95d59b9d
Commit
95d59b9d
authored
Feb 15, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow enabling modular headers in the podfile
parent
be48c58f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
Gemfile.lock
Gemfile.lock
+1
-1
pod_target.rb
lib/cocoapods/target/pod_target.rb
+1
-0
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+13
-0
No files found.
Gemfile.lock
View file @
95d59b9d
...
@@ -7,7 +7,7 @@ GIT
...
@@ -7,7 +7,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Core.git
remote: https://github.com/CocoaPods/Core.git
revision:
1f8ced657a224eabeba6958d130ee04058d91f60
revision:
e0c6884b37ab6a44095a2bbdbfe9032627a90388
branch: master
branch: master
specs:
specs:
cocoapods-core (1.4.0)
cocoapods-core (1.4.0)
...
...
lib/cocoapods/target/pod_target.rb
View file @
95d59b9d
...
@@ -204,6 +204,7 @@ module Pod
...
@@ -204,6 +204,7 @@ module Pod
def
defines_module?
def
defines_module?
return
@defines_module
if
defined?
(
@defines_module
)
return
@defines_module
if
defined?
(
@defines_module
)
return
@defines_module
=
true
if
uses_swift?
||
requires_frameworks?
return
@defines_module
=
true
if
uses_swift?
||
requires_frameworks?
return
@defines_module
=
true
if
target_definitions
.
any?
{
|
td
|
td
.
build_pod_as_module?
(
pod_name
)
}
@defines_module
=
non_test_specs
.
any?
{
|
s
|
s
.
consumer
(
platform
).
pod_target_xcconfig
[
'DEFINES_MODULE'
]
==
'YES'
}
@defines_module
=
non_test_specs
.
any?
{
|
s
|
s
.
consumer
(
platform
).
pod_target_xcconfig
[
'DEFINES_MODULE'
]
==
'YES'
}
end
end
...
...
spec/unit/target/pod_target_spec.rb
View file @
95d59b9d
...
@@ -287,6 +287,19 @@ module Pod
...
@@ -287,6 +287,19 @@ module Pod
@pod_target
.
stubs
(
:defines_module?
).
returns
(
true
)
@pod_target
.
stubs
(
:defines_module?
).
returns
(
true
)
end
end
it
'uses modular header search paths when specified in the podfile'
do
@pod_target
.
unstub
(
:defines_module?
)
@pod_target
.
target_definitions
.
first
.
stubs
(
:build_pod_as_module?
).
with
(
'BananaLib'
).
returns
(
true
)
@pod_target
.
build_headers
.
add_search_path
(
'BananaLib'
,
Platform
.
ios
)
@pod_target
.
sandbox
.
public_headers
.
add_search_path
(
'BananaLib'
,
Platform
.
ios
)
header_search_paths
=
@pod_target
.
header_search_paths
header_search_paths
.
sort
.
should
==
[
'${PODS_ROOT}/Headers/Private/BananaLib'
,
'${PODS_ROOT}/Headers/Public/BananaLib'
,
]
end
it
'returns the correct header search paths'
do
it
'returns the correct header search paths'
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
)
...
...
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