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
dcfc2e3c
Commit
dcfc2e3c
authored
Feb 24, 2015
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Project] Make legacy Xcode build root support customizable.
parent
2748a78b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
4 deletions
+38
-4
CHANGELOG.md
CHANGELOG.md
+3
-1
project.rb
lib/cocoapods/project.rb
+20
-3
project_spec.rb
spec/unit/project_spec.rb
+15
-0
No files found.
CHANGELOG.md
View file @
dcfc2e3c
...
...
@@ -65,7 +65,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Boris Bügling
](
https://github.com/neonichu
)
[
#2912
](
https://github.com/CocoaPods/CocoaPods/issues/2912
)
*
Adding Xcode Legacy build location support for default Pods.xcodeproj.
*
Adding Xcode Legacy build location support for default Pods.xcodeproj.
It defaults to
`${SRCROOT}/../build`
but can be changed in a
`post_install`
hook by using the
`Project#symroot=`
writer.
[
Sam Marshall
](
https://github.com/samdmarshall
)
##### Bug Fixes
...
...
lib/cocoapods/project.rb
View file @
dcfc2e3c
...
...
@@ -17,9 +17,7 @@ module Pod
@refs_by_absolute_path
=
{}
@pods
=
new_group
(
'Pods'
)
@development_pods
=
new_group
(
'Development Pods'
)
configs
=
root_object
.
build_configuration_list
.
build_configurations
settings_for_all_configs
=
configs
.
map
(
&
:build_settings
)
settings_for_all_configs
.
each
{
|
settings
|
settings
[
'SYMROOT'
]
=
'${SRCROOT}/../build'
}
self
.
symroot
=
LEGACY_BUILD_ROOT
end
# @return [PBXGroup] The group for the support files of the aggregate
...
...
@@ -37,6 +35,25 @@ module Pod
public
# @!group Legacy Xcode build root
#-------------------------------------------------------------------------#
LEGACY_BUILD_ROOT
=
'${SRCROOT}/../build'
# @param [String] symroot
# The build root that is used when Xcode is configured to not use the
# workspace’s build root. Defaults to `${SRCROOT}/../build`.
#
# @return [void]
#
def
symroot
=
(
symroot
)
root_object
.
build_configuration_list
.
build_configurations
.
each
do
|
config
|
config
.
build_settings
[
'SYMROOT'
]
=
symroot
end
end
public
# @!group Pod Groups
#-------------------------------------------------------------------------#
...
...
spec/unit/project_spec.rb
View file @
dcfc2e3c
...
...
@@ -20,6 +20,21 @@ module Pod
it
'creates the development Pods group on initialization'
do
@project
.
development_pods
.
name
.
should
==
'Development Pods'
end
def
settings_for_root_configs
(
key
)
@project
.
root_object
.
build_configuration_list
.
build_configurations
.
map
do
|
config
|
config
.
build_settings
[
key
]
end
end
it
'assigns a SYMROOT to each root build configuration'
do
@project
.
symroot
=
'some/build/path'
settings_for_root_configs
(
'SYMROOT'
).
uniq
.
should
==
[
'some/build/path'
]
end
it
'sets a default SYMROOT for legacy Xcode build setups'
do
settings_for_root_configs
(
'SYMROOT'
).
uniq
.
should
==
[
Project
::
LEGACY_BUILD_ROOT
]
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