[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
This commit is contained in:
@@ -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')));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user