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
64a8b1ee
Commit
64a8b1ee
authored
Jan 29, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ModuleMap] Extra header string generation into a Header class
parent
7300c82c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
module_map.rb
lib/cocoapods/generator/module_map.rb
+27
-1
target_installer.rb
...nstaller/xcode/pods_project_generator/target_installer.rb
+1
-0
No files found.
lib/cocoapods/generator/module_map.rb
View file @
64a8b1ee
...
...
@@ -10,12 +10,38 @@ module Pod
#
attr_reader
:target
attr_reader
:headers
Header
=
Struct
.
new
(
:path
,
:umbrella
,
:private
,
:textual
,
:size
,
:mtime
)
do
alias
private
?
private
def
to_s
[
(:
private
if
private
?)
,
(
:textual
if
textual
),
(
:umbrella
if
umbrella
),
'header'
,
%("#{path}")
,
attrs
,
].
compact
.
join
(
' '
)
end
def
attrs
attrs
=
{
'size'
=>
size
,
'mtime'
=>
mtime
,
}.
reject
{
|
k
,
v
|
v
.
nil?
}
return
nil
if
attrs
.
empty?
attrs
.
to_s
end
end
# Initialize a new instance
#
# @param [PodTarget] target @see target
#
def
initialize
(
target
)
@target
=
target
@headers
=
[
Header
.
new
(
target
.
umbrella_header_path
.
basename
,
true
)]
end
# Generates and saves the Info.plist to the given path.
...
...
@@ -39,7 +65,7 @@ module Pod
def
generate
<<-
MODULE_MAP
.
strip_heredoc
#{
module_specificier_prefix
}
module
#{
target
.
product_module_name
}
{
umbrella header "
#{
target
.
umbrella_header_path
.
basename
}
"
#{
headers
.
join
(
"
\n
"
)
}
export *
module * { export * }
...
...
lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb
View file @
64a8b1ee
...
...
@@ -176,6 +176,7 @@ module Pod
path
=
target
.
module_map_path
UI
.
message
"- Generating module map file at
#{
UI
.
path
(
path
)
}
"
do
generator
=
Generator
::
ModuleMap
.
new
(
target
)
yield
generator
if
block_given?
update_changed_file
(
generator
,
path
)
add_file_to_support_group
(
path
)
...
...
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