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
17a5f930
Commit
17a5f930
authored
Jun 28, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Refactor] Renamed TargetInstaller#target to native_target
parent
411bfb13
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+6
-6
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+2
-2
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+6
-6
target_installer_spec.rb
spec/unit/installer/target_installer_spec.rb
+1
-1
No files found.
lib/cocoapods/installer/target_installer.rb
View file @
17a5f930
...
...
@@ -39,10 +39,10 @@ module Pod
name
=
library
.
label
platform
=
library
.
platform
.
name
deployment_target
=
library
.
platform
.
deployment_target
.
to_s
@target
=
project
.
new_target
(
:static_library
,
name
,
platform
,
deployment_target
)
@
native_
target
=
project
.
new_target
(
:static_library
,
name
,
platform
,
deployment_target
)
library
.
user_build_configurations
.
each
do
|
bc_name
,
type
|
configuration
=
@target
.
add_build_configuration
(
bc_name
,
type
)
configuration
=
@
native_
target
.
add_build_configuration
(
bc_name
,
type
)
end
settings
=
{
'OTHER_LDFLAGS'
=>
''
,
'OTHER_LIBTOOLFLAGS'
=>
''
}
...
...
@@ -50,11 +50,11 @@ module Pod
settings
[
'ARCHS'
]
=
library
.
archs
end
@target
.
build_configurations
.
each
do
|
configuration
|
@
native_
target
.
build_configurations
.
each
do
|
configuration
|
configuration
.
build_settings
.
merge!
(
settings
)
end
library
.
target
=
@
target
library
.
native_target
=
@native_
target
end
# Creates the directory where to store the support files of the target.
...
...
@@ -73,7 +73,7 @@ module Pod
generator
=
Generator
::
DummySource
.
new
(
library
.
label
)
generator
.
save_as
(
path
)
file_reference
=
add_file_to_support_group
(
path
)
target
.
source_build_phase
.
add_file_reference
(
file_reference
)
native_
target
.
source_build_phase
.
add_file_reference
(
file_reference
)
end
# @return [PBXNativeTarget] the target generated by the installation
...
...
@@ -81,7 +81,7 @@ module Pod
#
# @note Generated by the {#add_target} step.
#
attr_reader
:target
attr_reader
:
native_
target
private
...
...
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
17a5f930
...
...
@@ -43,7 +43,7 @@ module Pod
# @return [void]
#
def
create_xcconfig_file
target
.
build_configurations
.
each
do
|
configuration
|
native_
target
.
build_configurations
.
each
do
|
configuration
|
path
=
library
.
xcconfig_path
(
configuration
.
name
)
gen
=
Generator
::
XCConfig
::
AggregateXCConfig
.
new
(
library
,
configuration
.
name
)
gen
.
save_as
(
path
)
...
...
@@ -74,7 +74,7 @@ module Pod
def
create_bridge_support_file
if
target_definition
.
podfile
.
generate_bridge_support?
path
=
library
.
bridge_support_path
headers
=
target
.
headers_build_phase
.
files
.
map
{
|
bf
|
sandbox
.
root
+
bf
.
file_ref
.
path
}
headers
=
native_
target
.
headers_build_phase
.
files
.
map
{
|
bf
|
sandbox
.
root
+
bf
.
file_ref
.
path
}
generator
=
Generator
::
BridgeSupport
.
new
(
headers
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
17a5f930
...
...
@@ -39,9 +39,9 @@ module Pod
all_source_files
=
file_accessor
.
source_files
regular_source_files
=
all_source_files
.
reject
{
|
sf
|
sf
.
extname
==
'.d'
}
regular_file_refs
=
regular_source_files
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
target
.
add_file_references
(
regular_file_refs
,
flags
)
native_
target
.
add_file_references
(
regular_file_refs
,
flags
)
other_file_refs
=
(
all_source_files
-
regular_source_files
).
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
target
.
add_file_references
(
other_file_refs
,
nil
)
native_
target
.
add_file_references
(
other_file_refs
,
nil
)
end
end
...
...
@@ -57,7 +57,7 @@ module Pod
file_accessor
.
resource_bundles
.
each
do
|
bundle_name
,
paths
|
# Add a dependency on an existing Resource Bundle target if possible
if
bundle_target
=
project
.
targets
.
find
{
|
target
|
target
.
name
==
bundle_name
}
target
.
add_dependency
(
bundle_target
)
native_
target
.
add_dependency
(
bundle_target
)
next
end
file_references
=
paths
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
...
...
@@ -68,7 +68,7 @@ module Pod
bundle_target
.
add_build_configuration
(
bc_name
,
type
)
end
target
.
add_dependency
(
bundle_target
)
native_
target
.
add_dependency
(
bundle_target
)
end
end
end
...
...
@@ -88,7 +88,7 @@ module Pod
private_gen
.
save_as
(
path
)
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
target
.
build_configurations
.
each
do
|
c
|
native_
target
.
build_configurations
.
each
do
|
c
|
c
.
base_configuration_reference
=
xcconfig_file_ref
end
end
...
...
@@ -106,7 +106,7 @@ module Pod
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
target
.
build_configurations
.
each
do
|
c
|
native_
target
.
build_configurations
.
each
do
|
c
|
relative_path
=
path
.
relative_path_from
(
project
.
path
.
dirname
)
c
.
build_settings
[
'GCC_PREFIX_HEADER'
]
=
relative_path
.
to_s
end
...
...
spec/unit/installer/target_installer_spec.rb
View file @
17a5f930
...
...
@@ -32,7 +32,7 @@ module Pod
it
'adds the architectures to the custom build configurations of the user target'
do
@pod_target
.
archs
=
'$(ARCHS_STANDARD_64_BIT)'
@installer
.
send
(
:add_target
)
@installer
.
send
(
:target
).
resolved_build_setting
(
'ARCHS'
).
should
==
{
@installer
.
send
(
:
native_
target
).
resolved_build_setting
(
'ARCHS'
).
should
==
{
'Release'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
'Debug'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
'AppStore'
=>
'$(ARCHS_STANDARD_64_BIT)'
,
...
...
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