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
6b66e200
Commit
6b66e200
authored
Jan 24, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ModuleMap] Only add the ‘framework’ prefix when building a framework
parent
ceb00de0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
module_map.rb
lib/cocoapods/generator/module_map.rb
+14
-1
module_map_spec.rb
spec/unit/generator/module_map_spec.rb
+15
-0
No files found.
lib/cocoapods/generator/module_map.rb
View file @
6b66e200
...
...
@@ -38,7 +38,7 @@ module Pod
#
def
generate
<<-
MODULE_MAP
.
strip_heredoc
framework
module
#{
target
.
product_module_name
}
{
#{
module_specificier_prefix
}
module
#{
target
.
product_module_name
}
{
umbrella header "
#{
target
.
umbrella_header_path
.
basename
}
"
export *
...
...
@@ -46,6 +46,19 @@ module Pod
}
MODULE_MAP
end
private
# The prefix to `module` to prepend in the module map.
# Ensures that only framework targets have `framework` prepended.
#
def
module_specificier_prefix
if
target
.
requires_frameworks?
'framework '
else
''
end
end
end
end
end
spec/unit/generator/module_map_spec.rb
View file @
6b66e200
...
...
@@ -10,6 +10,7 @@ module Pod
it
'writes the module map to the disk'
do
path
=
temporary_directory
+
'BananaLib.modulemap'
@pod_target
.
stubs
(
:requires_frameworks?
).
returns
(
true
)
@gen
.
save_as
(
path
)
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
framework module BananaLib {
...
...
@@ -20,5 +21,19 @@ module Pod
}
EOS
end
it
'writes the module map to the disk for a library'
do
path
=
temporary_directory
+
'BananaLib.modulemap'
@pod_target
.
stubs
(
:requires_frameworks?
).
returns
(
false
)
@gen
.
save_as
(
path
)
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
module BananaLib {
umbrella header "BananaLib-umbrella.h"
export *
module * { export * }
}
EOS
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