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
e0e98e51
Commit
e0e98e51
authored
Jul 26, 2014
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Style] Tweaks and documentation
parent
b74063c4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
19 deletions
+29
-19
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+3
-2
installer.rb
lib/cocoapods/installer.rb
+5
-1
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+6
-6
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+1
-1
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+2
-2
target.rb
lib/cocoapods/target.rb
+6
-4
pod_target.rb
lib/cocoapods/target/pod_target.rb
+5
-2
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+1
-1
No files found.
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
e0e98e51
...
@@ -12,8 +12,9 @@ module Pod
...
@@ -12,8 +12,9 @@ module Pod
# @param [Target] target @see target
# @param [Target] target @see target
#
#
# @param [String] configuration_name Name of the build configuration to
# @param [String] configuration_name
# generate this xcconfig for.
# The name of the build configuration to generate this xcconfig
# for.
#
#
def
initialize
(
target
,
configuration_name
)
def
initialize
(
target
,
configuration_name
)
@target
=
target
@target
=
target
...
...
lib/cocoapods/installer.rb
View file @
e0e98e51
...
@@ -178,7 +178,11 @@ module Pod
...
@@ -178,7 +178,11 @@ module Pod
@aggregate_targets
=
analyzer
.
result
.
targets
@aggregate_targets
=
analyzer
.
result
.
targets
end
end
# @raise Raises an informative if the hooks raises.
# Ensures that the white-listed build configurations are known to prevent
# silent typos.
#
# @raise If a unknown user configuration is found.
#
def
validate_whitelisted_configurations
def
validate_whitelisted_configurations
whitelisted_configs
=
pod_targets
.
map
do
|
target
|
whitelisted_configs
=
pod_targets
.
map
do
|
target
|
target
.
target_definition
.
all_whitelisted_configurations
target
.
target_definition
.
all_whitelisted_configurations
...
...
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
e0e98e51
...
@@ -32,14 +32,14 @@ module Pod
...
@@ -32,14 +32,14 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_xcconfig_file
def
create_xcconfig_file
target
.
build_configurations
.
each
do
|
build_config
|
target
.
build_configurations
.
each
do
|
configuration
|
path
=
library
.
xcconfig_path
build_config
path
=
library
.
xcconfig_path
(
configuration
)
UI
.
message
"- Generating
#{
build_config
.
name
}
xcconfig file at
#{
UI
.
path
(
path
)
}
"
do
UI
.
message
"- Generating
#{
configuration
.
name
}
xcconfig file at
#{
UI
.
path
(
path
)
}
"
do
gen
=
Generator
::
XCConfig
::
AggregateXCConfig
.
new
(
library
,
build_config
.
name
)
gen
=
Generator
::
XCConfig
::
AggregateXCConfig
.
new
(
library
,
configuration
.
name
)
gen
.
save_as
(
path
)
gen
.
save_as
(
path
)
library
.
xcconfigs
[
build_config
.
name
]
=
gen
.
xcconfig
library
.
xcconfigs
[
configuration
.
name
]
=
gen
.
xcconfig
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
xcconfig_file_ref
=
add_file_to_support_group
(
path
)
build_config
.
base_configuration_reference
=
xcconfig_file_ref
configuration
.
base_configuration_reference
=
xcconfig_file_ref
end
end
end
end
end
end
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
e0e98e51
...
@@ -83,7 +83,7 @@ module Pod
...
@@ -83,7 +83,7 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_xcconfig_file
def
create_xcconfig_file
path
=
library
.
xcconfig_path
nil
path
=
library
.
xcconfig_path
public_gen
=
Generator
::
XCConfig
::
PublicPodXCConfig
.
new
(
library
)
public_gen
=
Generator
::
XCConfig
::
PublicPodXCConfig
.
new
(
library
)
UI
.
message
"- Generating public xcconfig file at
#{
UI
.
path
(
path
)
}
"
do
UI
.
message
"- Generating public xcconfig file at
#{
UI
.
path
(
path
)
}
"
do
public_gen
.
save_as
(
path
)
public_gen
.
save_as
(
path
)
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
e0e98e51
...
@@ -110,8 +110,8 @@ module Pod
...
@@ -110,8 +110,8 @@ module Pod
def
add_xcconfig_base_configuration
def
add_xcconfig_base_configuration
native_targets
.
each
do
|
native_target
|
native_targets
.
each
do
|
native_target
|
native_target
.
build_configurations
.
each
do
|
config
|
native_target
.
build_configurations
.
each
do
|
config
|
rel
path
=
target
.
xcconfig_relative_path
(
config
.
name
)
path
=
target
.
xcconfig_relative_path
(
config
.
name
)
xcconfig
=
user_project
.
files
.
select
{
|
f
|
f
.
path
==
relpath
}.
first
||
user_project
.
new_file
(
rel
path
)
xcconfig
=
user_project
.
files
.
select
{
|
f
|
f
.
path
==
path
}.
first
||
user_project
.
new_file
(
path
)
check_overridden_build_settings
(
target
.
xcconfigs
[
config
.
name
],
native_target
)
check_overridden_build_settings
(
target
.
xcconfigs
[
config
.
name
],
native_target
)
config
.
base_configuration_reference
=
xcconfig
config
.
base_configuration_reference
=
xcconfig
...
...
lib/cocoapods/target.rb
View file @
e0e98e51
...
@@ -77,12 +77,14 @@ module Pod
...
@@ -77,12 +77,14 @@ module Pod
@sandbox
.
library_support_files_dir
(
name
)
@sandbox
.
library_support_files_dir
(
name
)
end
end
# @param [String] variant (optional) If you have multiple variants of xcconfigs for this target
# @param [String] variant
# => (e g per build configuration), provide the variant type here.
# The variant of the xcconfig. Used to differentiate build
# configurations.
#
# @return [Pathname] the absolute path of the xcconfig file.
# @return [Pathname] the absolute path of the xcconfig file.
#
#
def
xcconfig_path
(
variant
)
def
xcconfig_path
(
variant
=
nil
)
if
variant
then
if
variant
support_files_root
+
"
#{
label
}
.
#{
variant
}
.xcconfig"
support_files_root
+
"
#{
label
}
.
#{
variant
}
.xcconfig"
else
else
support_files_root
+
"
#{
label
}
.xcconfig"
support_files_root
+
"
#{
label
}
.xcconfig"
...
...
lib/cocoapods/target/pod_target.rb
View file @
e0e98e51
...
@@ -64,8 +64,11 @@ module Pod
...
@@ -64,8 +64,11 @@ module Pod
end
.
flatten
end
.
flatten
end
end
# @param [String] configuration_name Name of the build configuration that
# Checks if the target should be included in the build configuration with
# the caller is unsure of if this target should be linked with.
# the given name.
#
# @param [String] configuration_name
# The name of the build configuration.
#
#
def
include_in_build_config?
(
configuration_name
)
def
include_in_build_config?
(
configuration_name
)
@target_definition
.
pod_whitelisted_for_configuration?
(
pod_name
,
configuration_name
)
@target_definition
.
pod_whitelisted_for_configuration?
(
pod_name
,
configuration_name
)
...
...
spec/unit/target/pod_target_spec.rb
View file @
e0e98e51
...
@@ -57,7 +57,7 @@ module Pod
...
@@ -57,7 +57,7 @@ module Pod
end
end
it
"returns the absolute path of the public and private xcconfig files"
do
it
"returns the absolute path of the public and private xcconfig files"
do
@pod_target
.
xcconfig_path
(
nil
)
.
to_s
.
should
.
include
'Pods/Pods-BananaLib.xcconfig'
@pod_target
.
xcconfig_path
.
to_s
.
should
.
include
'Pods/Pods-BananaLib.xcconfig'
@pod_target
.
xcconfig_private_path
.
to_s
.
should
.
include
'Pods/Pods-BananaLib-Private.xcconfig'
@pod_target
.
xcconfig_private_path
.
to_s
.
should
.
include
'Pods/Pods-BananaLib-Private.xcconfig'
end
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