-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XCConfig files #64
XCConfig files #64
Changes from 5 commits
3abaf7a
eb5738d
8e3966a
67ad669
c34136b
8929625
71e5b4a
2d1ccb6
8a993fd
1323117
4877edf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BASE_SETTING = baseSetting | ||
OVERWRITTEN_SETTING = base |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "base.xcconfig" | ||
|
||
CONFIG_SETTING = configSetting | ||
OVERWRITTEN_SETTING = new |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,15 +57,19 @@ extension ProjectSpec { | |
return buildSettings | ||
} | ||
|
||
// combines all levels of a target's settings | ||
// combines all levels of a target's settings: target, target config, project, project config | ||
public func getCombinedBuildSettings(basePath: Path, target: Target, config: Config, includeProject: Bool) -> BuildSettings { | ||
var buildSettings: BuildSettings = [:] | ||
if includeProject { | ||
if let configFilePath = configFiles[config.name] { | ||
if let configFile = try? XCConfig(path: basePath + configFilePath) { | ||
buildSettings += configFile.flattenedBuildSettings() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe including xcconfig should just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh and what if included xcconfig There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what you mean by the first point? Maybe these will answer your question.
For the second point There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Understood. I'm going to take a look at the details.👌 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What I meant was
This behavior is perfectly 🙆♂️ to me. Maybe it worth it to warn user when Maybe we should really rename There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's because include is a list not just a string. I should change this though to allow a simple string for a single value, just like a target's sources:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
} | ||
buildSettings += getProjectBuildSettings(config: config) | ||
} | ||
if let configFilePath = target.configFiles[config.name] { | ||
let path = basePath + configFilePath | ||
if let configFile = try? XCConfig(path: path) { | ||
if let configFile = try? XCConfig(path: basePath + configFilePath) { | ||
buildSettings += configFile.flattenedBuildSettings() | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you create this
TestProject.xcodeproj/project.pbxproj
?On Xcode,
Configs
group is missing reference (appears red).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
TestProject.xcodeproj
was created and edited in Xcode.GeneratedProject.xcodeproj
is the one generated by XcodeGen.I'm not sure what you mean by missing configs group. Both projects appear fine for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw what you mean by the red group, I've fixed this in master. This project isn't really used in any tests and is more just for a comparison between a project created in xcode versus created in XcodeGen