-
Notifications
You must be signed in to change notification settings - Fork 383
Add build configurations for tuist workspace #5364
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
Conversation
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.
Looks good but I have one question before approving. Would it work without the Local.xcconfig
file being present?
Projects/PaywallTester/Project.swift
Outdated
if FileManager.default.fileExists(atPath: "Local.xcconfig") { | ||
additionalFiles.append(.glob(pattern: "../../Local.xcconfig")) | ||
} |
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.
Maybe not for this PR, but would it be possible/make sense to have this be reused from the main Project.swift
instead of repeated in every Project.swift
file?
Maybe something similar to xcconfigFileConfigurations
below. E.g. commonFiles
.
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 think so, let me re-do this
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'll tackle this in another PR, but I think that since we're adding those files to the workspace it should be ok if we remove them from each project.
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.
Looks good but I have one concern/doubt about the Local.xcconfig file being added to the PaywallTester
target, which I think is unnecessary
Projects/PaywallTester/Project.swift
Outdated
@@ -49,6 +47,9 @@ let project = Project( | |||
sources: [ | |||
"../../Tests/TestingApps/PaywallsTester/PaywallsTester/**/*.swift" | |||
], | |||
resources: [ | |||
additionalFiles.count == 2 ? "../../Local.xcconfig" : "" |
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.
This looks dangerous. And I don't really understand why this is needed? I don't think xcconfig files need to be added to the targets
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've removed additionalFiles
from the project definition. Now those are declared in the workspace.
settings: .settings( | ||
base: [:].automaticCodeSigning(devTeam: .revenueCatTeamID), | ||
configurations: .xcconfigFileConfigurations, | ||
defaultSettings: .essential | ||
), |
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.
this can probably be generalized even further (for another PR)
@RCGitBot please test |
public static var xcconfigFileConfigurations: [Configuration] { | ||
[ | ||
.debug(name: "Debug", xcconfig: .relativeToRoot("Global.xcconfig")), | ||
.release(name: "Release", xcconfig: .relativeToRoot("Global.xcconfig")), |
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 am not sure about this, I think it shouldn't point to the Global.xcconfig
right @ajpallares ?
@RCGitBot please test |
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.
Great job! We keep iterating on this 💪
"REVENUECAT_API_KEY": "$(REVENUECAT_API_KEY)", | ||
"REVENUECAT_PROXY_URL_SCHEME": "$(REVENUECAT_PROXY_URL_SCHEME)", | ||
"REVENUECAT_PROXY_URL_HOST": "$(REVENUECAT_PROXY_URL_HOST)" |
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.
Question: wouldn't this be covered by the xcconfig?
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.
mmm good question, I'll try it out
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.
Just tested it out, and we need it. Otherwise it's not picked by the bundle
Motivation
While testing the maestro app I realized the xcconfig files were not being picked.
Description