Unverified Commit 15154b11 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] deprecate build aot (#59487)

This command was previously used by the re-entrant build scripts in xcode_backend.sh and build.gradle. These have since been refactored to use flutter assemble.

Deprecation the command in preparation for removal in a future release of flutter. The only current use is a test on HHH
parent 7042be88
......@@ -51,8 +51,12 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
@override
final String name = 'aot';
// TODO(jonahwilliams): remove after https://github.com/flutter/flutter/issues/49562 is resolved.
@override
final String description = "Build an ahead-of-time compiled snapshot of your app's Dart code.";
bool get deprecated => true;
@override
final String description = "(deprecated) Build an ahead-of-time compiled snapshot of your app's Dart code.";
@override
Future<FlutterCommandResult> runCommand() async {
......
......@@ -62,4 +62,20 @@ void main() {
expect(result.stdout, isEmpty);
});
test('flutter build aot is deprecated', () async {
final String flutterBin = globals.fs.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await const LocalProcessManager().run(<String>[
flutterBin,
'build',
'-h',
'-v',
]);
// Deprecated.
expect(result.stdout, isNot(contains('aot')));
// Only printed by verbose tool.
expect(result.stdout, isNot(contains('exiting with code 0')));
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment