Pass environment variables through to xcodebuild#43553
Conversation
|
Do you guys have suggestions for where to document this? |
|
\cc @godofredoc |
3a17c4b to
b7c98b6
Compare
There was a problem hiding this comment.
Could you refactor this a little? I know you have tests for this, but it's difficult to read now, and I worry that later on contributors might make one or two little tweaks to it...
There was a problem hiding this comment.
Cool, I didn't know about testUsingOsxContext
Good question. Maybe a new wiki page for Xcode configuration? |
b7c98b6 to
4c2f5e8
Compare
There was a problem hiding this comment.
@christopherfujino Is this more or less readable than what I had before?
There was a problem hiding this comment.
nit: I would chain all of these Iterable methods into a single expression. There is a lot of lhs real-estate dedicated to very temporary identifiers.
There was a problem hiding this comment.
@christopherfujino said:
#43553 (comment)
and then even claimed:
#43553 (comment)
Let me split the difference.
There was a problem hiding this comment.
It's perfectly fine to return a list here, but note that all of the contexts you are using this in can accept an Iterable as well.
There was a problem hiding this comment.
At runtime the map used by platform.environment will be unmodifiable. For tests that mock the platform, its good to use a const map or Map.unmodifiable to ensure there is no accidental setting of values, since this will throw during the normal runtime.
4c2f5e8 to
8096193
Compare
Description
Allow developers to pass in arbitrary Xcode build settings via environment variables prefixed with
FLUTTER_XCODE_. This will prevent the need for a newflutterflag for every build setting a developer may want to change.We can use this in our device lab to override code signing Xcode settings without needing to edit every integration test Xcode project, for example.
Removes the need for patterns like FLUTTER_DEVICELAB_XCODE_PROVISIONING_CONFIG that inject xcconfig files into Generated files (see https://github.com/flutter/flutter/pull/10736/files)
Related Issues
See proposal in #37231 (comment).
Tests
Added a few
xcodebuild commandstests.Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change