这是indexloc提供的服务,不要输入任何密码
Skip to content

[flutter_tools] add --config-only option to flutter build ios #64848

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

Merged
merged 5 commits into from
Sep 1, 2020

Conversation

jonahwilliams
Copy link
Contributor

Description

Allow updating the generated .xcconfig and pods without building the entire application. This is useful for avoiding duplicate work that would then be performed by Xcode archive anyway.

#13065
#64626

@flutter-dashboard flutter-dashboard bot added tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Aug 29, 2020
Copy link
Member

@xster xster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. You can also swap out the lines that say flutter build ios from https://flutter.dev/docs/deployment/cd as well since there's a fastlane step after.


// Config is updated if command succeeded.
expect(generatedConfig, exists);
expect(generatedConfig.readAsStringSync(), contains('DART_OBFUSCATION=true'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check a few more non-specified things like FLUTTER_FRAMEWORK_DIR is also pointing to reasonable places etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done-ish

'--config-only',
'--release',
'--obfuscate',
'--split-debug-info=info',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add an "advanced" usage that synergizes with xcode more? Something like --flavor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--flavor does not change any of the generated config, it just controls which scheme we tell xcodebuild to use.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true dat. How about --local-engine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll validate that it doesn't exist and fail :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as in you're going to assert users don't flutter build ios --config-only with --local-engine? Should we? If this is a flutter build ios --config-only command rather a flutter build ipa command, the intent is broader now no? We can't tell what the user wants to do and flutter build ios --config-only --local-engine can be a valid intent (e.g. this new path is now probably going to become the easiest way to flutter build ios --config-only --local-engine, then launch xcode and put a breakpoint on the engine code).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, the tool will fail to locate the local engine because it does not exist.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah got it. I misunderstood.

@jonahwilliams jonahwilliams marked this pull request as ready for review August 31, 2020 22:38
@xster
Copy link
Member

xster commented Aug 31, 2020

Still LGTM

@jonahwilliams
Copy link
Contributor Author

@xster you gotta hit the approve button so I get that little green checkmark :)

@xster
Copy link
Member

xster commented Aug 31, 2020

That takes 2 round trips of changing tab then opening the review pop up. LGTM takes 0.

@jonahwilliams
Copy link
Contributor Author

After merging, we should sanity check with some interested users and the proceed to update website documentation (such as https://flutter.dev/docs/deployment/cd mentioned by @xster) once we have a min supported version from a dev release

@fluttergithubbot fluttergithubbot merged commit 216da41 into flutter:master Sep 1, 2020
@jonahwilliams jonahwilliams deleted the _add_config_only branch September 1, 2020 00:24
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants