@@ -35,64 +35,58 @@ const _localFlutter = 'local-flutter';
3535const _reset = 'reset' ;
3636const _verbose = 'verbose' ;
3737
38- final _parser =
39- ArgParser ()
40- ..addOption (
41- _architecture,
42- abbr: 'a' ,
43- help: 'Specify your machine\' s architecture.' ,
44- allowed: ['ARM64' , 'X64' ],
45- defaultsTo: 'ARM64' ,
46- )
47- ..addFlag (
48- _buildSdk,
49- negatable: true ,
50- defaultsTo: true ,
51- help:
52- 'Whether to build the Dart SDK as part of running this script. '
53- 'Negate with --no-$_buildSdk if you have already built the Dart '
54- 'SDK locally and want to skip this step.' ,
55- )
56- ..addOption (
57- _localDart,
58- abbr: 'd' ,
59- help:
60- 'Path to your local Dart SDK directory. If unspecified, this value '
61- 'will default to the value of the LOCAL_DART_SDK environment '
62- 'variable.' ,
63- valueHelp: '/Users/me/path/to/dart-sdk/sdk' ,
64- )
65- ..addOption (
66- _localFlutter,
67- abbr: 'f' ,
68- help:
69- 'Path to your local Flutter SDK directory. If unspecified, this '
70- 'value will default to the value of the LOCAL_FLUTTER_SDK '
71- 'environment variable.' ,
72- valueHelp: '/Users/me/path/to/flutter' ,
73- )
74- ..addFlag (
75- _verbose,
76- negatable: false ,
77- abbr: 'v' ,
78- help:
79- 'Run the script with verbose output, which will forward the stdout '
80- 'and stderr of all sub-processes.' ,
81- )
82- ..addFlag (
83- _help,
84- negatable: false ,
85- abbr: 'h' ,
86- help: 'Show the program usage.' ,
87- )
88- ..addSeparator ('Additional commands' )
89- ..addFlag (
90- _reset,
91- negatable: false ,
92- help:
93- 'Reset your local Flutter SDK cache to undo the effects of running '
94- 'this script.' ,
95- );
38+ final _parser = ArgParser ()
39+ ..addOption (
40+ _architecture,
41+ abbr: 'a' ,
42+ help: 'Specify your machine\' s architecture.' ,
43+ allowed: ['ARM64' , 'X64' ],
44+ defaultsTo: 'ARM64' ,
45+ )
46+ ..addFlag (
47+ _buildSdk,
48+ negatable: true ,
49+ defaultsTo: true ,
50+ help: 'Whether to build the Dart SDK as part of running this script. '
51+ 'Negate with --no-$_buildSdk if you have already built the Dart '
52+ 'SDK locally and want to skip this step.' ,
53+ )
54+ ..addOption (
55+ _localDart,
56+ abbr: 'd' ,
57+ help: 'Path to your local Dart SDK directory. If unspecified, this value '
58+ 'will default to the value of the LOCAL_DART_SDK environment '
59+ 'variable.' ,
60+ valueHelp: '/Users/me/path/to/dart-sdk/sdk' ,
61+ )
62+ ..addOption (
63+ _localFlutter,
64+ abbr: 'f' ,
65+ help: 'Path to your local Flutter SDK directory. If unspecified, this '
66+ 'value will default to the value of the LOCAL_FLUTTER_SDK '
67+ 'environment variable.' ,
68+ valueHelp: '/Users/me/path/to/flutter' ,
69+ )
70+ ..addFlag (
71+ _verbose,
72+ negatable: false ,
73+ abbr: 'v' ,
74+ help: 'Run the script with verbose output, which will forward the stdout '
75+ 'and stderr of all sub-processes.' ,
76+ )
77+ ..addFlag (
78+ _help,
79+ negatable: false ,
80+ abbr: 'h' ,
81+ help: 'Show the program usage.' ,
82+ )
83+ ..addSeparator ('Additional commands' )
84+ ..addFlag (
85+ _reset,
86+ negatable: false ,
87+ help: 'Reset your local Flutter SDK cache to undo the effects of running '
88+ 'this script.' ,
89+ );
9690
9791void main (List <String > args) async {
9892 if (Platform .isWindows) {
@@ -115,8 +109,7 @@ void main(List<String> args) async {
115109
116110 var localDartSdk =
117111 options.option (_localDart) ?? Platform .environment['LOCAL_DART_SDK' ];
118- var localFlutterSdk =
119- options.option (_localFlutter) ??
112+ var localFlutterSdk = options.option (_localFlutter) ??
120113 Platform .environment['LOCAL_FLUTTER_SDK' ];
121114 if (localDartSdk == null || localFlutterSdk == null ) {
122115 stderr.writeln (
@@ -131,10 +124,13 @@ void main(List<String> args) async {
131124
132125 if (options.flag (_buildSdk)) {
133126 stdout.writeln ('Building the Dart SDK...' );
134- await _runCommand ('./tools/build.py' , [
135- '-mrelease' ,
136- 'create_sdk' ,
137- ], workingDirectory: localDartSdk);
127+ await _runCommand (
128+ './tools/build.py' ,
129+ [
130+ '-mrelease' ,
131+ 'create_sdk' ,
132+ ],
133+ workingDirectory: localDartSdk);
138134 }
139135
140136 await _deleteDartSdkInFlutterCache (localFlutterSdk);
@@ -184,8 +180,7 @@ void main(List<String> args) async {
184180}
185181
186182Future <void > _resetLocalFlutterSdk (ArgResults options) async {
187- var localFlutterSdk =
188- options.option (_localFlutter) ??
183+ var localFlutterSdk = options.option (_localFlutter) ??
189184 Platform .environment['LOCAL_FLUTTER_SDK' ];
190185 if (localFlutterSdk == null ) {
191186 stderr.writeln (
0 commit comments