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
99394b25
Commit
99394b25
authored
Jul 25, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3898 from CocoaPods/revert-module-support-for-static-libraries
Revert creation of module maps for static libraries
parents
d19dd87b
c17f8438
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
52 deletions
+14
-52
CHANGELOG.md
CHANGELOG.md
+10
-0
module_map.rb
lib/cocoapods/generator/module_map.rb
+1
-2
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+1
-30
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
module_map_spec.rb
spec/unit/generator/module_map_spec.rb
+1
-17
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+0
-2
No files found.
CHANGELOG.md
View file @
99394b25
...
@@ -13,6 +13,16 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -13,6 +13,16 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Russ Bishop
](
https://github.com/russbishop
)
[
Russ Bishop
](
https://github.com/russbishop
)
[
#3893
](
https://github.com/CocoaPods/CocoaPods/issues/3893
)
[
#3893
](
https://github.com/CocoaPods/CocoaPods/issues/3893
)
*
Pods integrated as static libraries can no longer be imported as
modules, as that change had unexpected side-effects.
[
Boris Bügling
](
https://github.com/neonichu
)
[
#3898
](
https://github.com/CocoaPods/CocoaPods/pull/3898
)
[
#3879
](
https://github.com/CocoaPods/CocoaPods/issues/3879
)
[
#3888
](
https://github.com/CocoaPods/CocoaPods/issues/3888
)
[
#3886
](
https://github.com/CocoaPods/CocoaPods/issues/3886
)
[
#3889
](
https://github.com/CocoaPods/CocoaPods/issues/3889
)
[
#3884
](
https://github.com/CocoaPods/CocoaPods/issues/3884
)
## 0.38.1
## 0.38.1
...
...
lib/cocoapods/generator/module_map.rb
View file @
99394b25
...
@@ -42,9 +42,8 @@ module Pod
...
@@ -42,9 +42,8 @@ module Pod
# @return [String]
# @return [String]
#
#
def
generate
def
generate
module_declaration_qualifier
=
target
.
requires_frameworks?
?
'framework '
:
''
result
=
<<-
eos
.
strip_heredoc
result
=
<<-
eos
.
strip_heredoc
#{
module_declaration_qualifier
}
module
#{
target
.
product_module_name
}
{
framework
module
#{
target
.
product_module_name
}
{
umbrella header "
#{
target
.
umbrella_header_path
.
basename
}
"
umbrella header "
#{
target
.
umbrella_header_path
.
basename
}
"
export *
export *
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
99394b25
...
@@ -22,15 +22,13 @@ module Pod
...
@@ -22,15 +22,13 @@ module Pod
create_xcconfig_file
create_xcconfig_file
if
target
.
requires_frameworks?
if
target
.
requires_frameworks?
create_info_plist_file
create_info_plist_file
end
create_module_map
do
|
generator
|
create_module_map
do
|
generator
|
generator
.
private_headers
+=
target
.
file_accessors
.
flat_map
(
&
:private_headers
).
map
(
&
:basename
)
generator
.
private_headers
+=
target
.
file_accessors
.
flat_map
(
&
:private_headers
).
map
(
&
:basename
)
end
end
create_umbrella_header
do
|
generator
|
create_umbrella_header
do
|
generator
|
generator
.
imports
+=
target
.
file_accessors
.
flat_map
(
&
:public_headers
).
map
(
&
:basename
)
generator
.
imports
+=
target
.
file_accessors
.
flat_map
(
&
:public_headers
).
map
(
&
:basename
)
end
end
link_module_map
end
link_umbrella_header
create_prefix_header
create_prefix_header
create_dummy_source
create_dummy_source
end
end
...
@@ -185,27 +183,6 @@ module Pod
...
@@ -185,27 +183,6 @@ module Pod
end
end
end
end
# Links a module map to Public headers.
#
# @return [void]
#
def
link_module_map
return
if
target
.
requires_frameworks?
&&
target
.
should_build?
sandbox
.
public_headers
.
add_file
(
target
.
name
,
target
.
module_map_path
,
'module.modulemap'
,
target
.
platform
)
end
# Links a an umbrella header to Public headers.
#
# @return [void]
#
def
link_umbrella_header
return
if
custom_module_map
return
if
target
.
requires_frameworks?
&&
target
.
should_build?
sandbox
.
public_headers
.
add_files
(
target
.
name
,
[
target
.
umbrella_header_path
],
target
.
platform
)
end
# Creates a prefix header file which imports `UIKit` or `Cocoa` according
# Creates a prefix header file which imports `UIKit` or `Cocoa` according
# to the platform of the target. This file also include any prefix header
# to the platform of the target. This file also include any prefix header
# content reported by the specification of the pods.
# content reported by the specification of the pods.
...
@@ -303,12 +280,6 @@ module Pod
...
@@ -303,12 +280,6 @@ module Pod
FileUtils
.
cp
(
custom_module_map
,
path
)
FileUtils
.
cp
(
custom_module_map
,
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
unless
target
.
requires_frameworks?
contents
=
path
.
read
contents
.
gsub!
(
/^\s*framework\s+module/
,
'module'
)
path
.
open
(
'w'
)
{
|
f
|
f
.
write
(
contents
)
}
end
native_target
.
build_configurations
.
each
do
|
c
|
native_target
.
build_configurations
.
each
do
|
c
|
relative_path
=
path
.
relative_path_from
(
sandbox
.
root
)
relative_path
=
path
.
relative_path_from
(
sandbox
.
root
)
c
.
build_settings
[
'MODULEMAP_FILE'
]
=
relative_path
.
to_s
c
.
build_settings
[
'MODULEMAP_FILE'
]
=
relative_path
.
to_s
...
...
cocoapods-integration-specs
@
26bb687a
Subproject commit
dc259ab02f3c492504f164b82c29e846243e4b52
Subproject commit
26bb687a87734a7b431074d2aca8b1a8c2f62c8c
spec/unit/generator/module_map_spec.rb
View file @
99394b25
...
@@ -9,9 +9,8 @@ module Pod
...
@@ -9,9 +9,8 @@ module Pod
@gen
=
Generator
::
ModuleMap
.
new
(
@pod_target
)
@gen
=
Generator
::
ModuleMap
.
new
(
@pod_target
)
end
end
it
'writes the
framework
module map to the disk'
do
it
'writes the module map to the disk'
do
path
=
temporary_directory
+
'BananaLib.modulemap'
path
=
temporary_directory
+
'BananaLib.modulemap'
@pod_target
.
stubs
(
:requires_frameworks?
=>
true
)
@gen
.
save_as
(
path
)
@gen
.
save_as
(
path
)
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
framework module BananaLib {
framework module BananaLib {
...
@@ -23,23 +22,8 @@ module Pod
...
@@ -23,23 +22,8 @@ module Pod
EOS
EOS
end
end
it
'writes the library module map to the disk'
do
path
=
temporary_directory
+
'BananaLib.modulemap'
@pod_target
.
stubs
(
:requires_frameworks?
=>
false
)
@gen
.
save_as
(
path
)
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
module BananaLib {
umbrella header "BananaLib-umbrella.h"
export *
module * { export * }
}
EOS
end
it
'correctly adds private headers'
do
it
'correctly adds private headers'
do
@gen
.
stubs
(
:private_headers
).
returns
([
'Private.h'
])
@gen
.
stubs
(
:private_headers
).
returns
([
'Private.h'
])
@pod_target
.
stubs
(
:requires_frameworks?
=>
true
)
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
framework module BananaLib {
framework module BananaLib {
umbrella header "BananaLib-umbrella.h"
umbrella header "BananaLib-umbrella.h"
...
...
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
99394b25
...
@@ -103,7 +103,6 @@ module Pod
...
@@ -103,7 +103,6 @@ module Pod
'Pods-BananaLib-Private.xcconfig'
,
'Pods-BananaLib-Private.xcconfig'
,
'Pods-BananaLib-dummy.m'
,
'Pods-BananaLib-dummy.m'
,
'Pods-BananaLib-prefix.pch'
,
'Pods-BananaLib-prefix.pch'
,
'Pods-BananaLib.modulemap'
,
'Pods-BananaLib.xcconfig'
,
'Pods-BananaLib.xcconfig'
,
]
]
end
end
...
@@ -146,7 +145,6 @@ module Pod
...
@@ -146,7 +145,6 @@ module Pod
'BananaLib-Private.xcconfig'
,
'BananaLib-Private.xcconfig'
,
'BananaLib-dummy.m'
,
'BananaLib-dummy.m'
,
'BananaLib-prefix.pch'
,
'BananaLib-prefix.pch'
,
'BananaLib.modulemap'
,
'BananaLib.xcconfig'
,
'BananaLib.xcconfig'
,
]
]
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