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
47be0099
Commit
47be0099
authored
Apr 19, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Target] Extract default build configurations into a constant
parent
a7620b0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-1
target.rb
lib/cocoapods/target.rb
+1
-0
spec_helper.rb
spec/spec_helper.rb
+1
-1
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
47be0099
...
@@ -441,7 +441,7 @@ module Pod
...
@@ -441,7 +441,7 @@ module Pod
user_project
=
nil
user_project
=
nil
client_root
=
config
.
installation_root
.
realpath
client_root
=
config
.
installation_root
.
realpath
user_target_uuids
=
[]
user_target_uuids
=
[]
user_build_configurations
=
target_definition
.
build_configurations
||
{
'Release'
=>
:release
,
'Debug'
=>
:debug
}
user_build_configurations
=
target_definition
.
build_configurations
||
Target
::
DEFAULT_BUILD_CONFIGURATIONS
archs
=
[]
archs
=
[]
if
target_definition
.
platform
&&
target_definition
.
platform
.
name
==
:osx
if
target_definition
.
platform
&&
target_definition
.
platform
.
name
==
:osx
archs
=
[
'$(ARCHS_STANDARD_64_BIT)'
]
archs
=
[
'$(ARCHS_STANDARD_64_BIT)'
]
...
...
lib/cocoapods/target.rb
View file @
47be0099
...
@@ -10,6 +10,7 @@ module Pod
...
@@ -10,6 +10,7 @@ module Pod
class
Target
class
Target
DEFAULT_VERSION
=
'1.0.0'
.
freeze
DEFAULT_VERSION
=
'1.0.0'
.
freeze
DEFAULT_NAME
=
'Default'
.
freeze
DEFAULT_NAME
=
'Default'
.
freeze
DEFAULT_BUILD_CONFIGURATIONS
=
{
'Release'
=>
:release
,
'Debug'
=>
:debug
}.
freeze
# @return [Sandbox] The sandbox where the Pods should be installed.
# @return [Sandbox] The sandbox where the Pods should be installed.
#
#
...
...
spec/spec_helper.rb
View file @
47be0099
...
@@ -146,7 +146,7 @@ def fixture_pod_target_with_specs(specs, host_requires_frameworks = false, user_
...
@@ -146,7 +146,7 @@ def fixture_pod_target_with_specs(specs, host_requires_frameworks = false, user_
target_definitions
,
file_accessors
,
scope_suffix
)
target_definitions
,
file_accessors
,
scope_suffix
)
end
end
def
fixture_aggregate_target
(
pod_targets
=
[],
host_requires_frameworks
=
false
,
user_build_configurations
=
{
'Release'
=>
:release
}
,
def
fixture_aggregate_target
(
pod_targets
=
[],
host_requires_frameworks
=
false
,
user_build_configurations
=
Pod
::
Target
::
DEFAULT_BUILD_CONFIGURATIONS
,
archs
=
[],
platform
=
Pod
::
Platform
.
new
(
:ios
,
'6.0'
),
target_definition
=
nil
)
archs
=
[],
platform
=
Pod
::
Platform
.
new
(
:ios
,
'6.0'
),
target_definition
=
nil
)
target_definition
||=
pod_targets
.
flat_map
(
&
:target_definitions
).
first
||
fixture_target_definition
target_definition
||=
pod_targets
.
flat_map
(
&
:target_definitions
).
first
||
fixture_target_definition
Pod
::
AggregateTarget
.
new
(
config
.
sandbox
,
host_requires_frameworks
,
user_build_configurations
,
archs
,
platform
,
Pod
::
AggregateTarget
.
new
(
config
.
sandbox
,
host_requires_frameworks
,
user_build_configurations
,
archs
,
platform
,
...
...
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