@@ -99,12 +99,17 @@ void main(List<String> arguments) async {
99
99
'pkgs/hooks/example/build/native_add_app/' ,
100
100
),
101
101
'dart' ,
102
- ['--enable-experiment=native-assets' , 'build' , 'cli' , 'bin/native_add_app.dart' ],
102
+ [
103
+ '--enable-experiment=native-assets' ,
104
+ 'build' ,
105
+ 'cli' ,
106
+ 'bin/native_add_app.dart' ,
107
+ ],
103
108
);
104
109
_runProcess (
105
110
repositoryRoot
106
111
.resolve (
107
- 'pkgs/hooks/example/build/native_add_app/build/cli/${Abi .current ().toString (). replaceAll ( '_' , '-' ) }/bundle/bin/native_add_app${Platform .isWindows ? '.exe' : '' }' ,
112
+ 'pkgs/hooks/example/build/native_add_app/build/cli/${Abi .current ().toString ()}/bundle/bin/native_add_app${Platform .isWindows ? '.exe' : '' }' ,
108
113
)
109
114
.toFilePath (),
110
115
[],
@@ -134,51 +139,50 @@ void main(List<String> arguments) async {
134
139
}
135
140
136
141
ArgParser makeArgParser () {
137
- final parser =
138
- ArgParser ()
139
- ..addFlag (
140
- 'help' ,
141
- abbr: 'h' ,
142
- negatable: false ,
143
- help: 'Prints this help message.' ,
144
- )
145
- ..addFlag (
146
- 'analyze' ,
147
- defaultsTo: true ,
148
- help: 'Run `dart analyze` on the packages.' ,
149
- )
150
- ..addFlag (
151
- 'coverage' ,
152
- defaultsTo: false ,
153
- help: 'Run `dart run coverage:test_with_coverage` on the packages.' ,
154
- )
155
- ..addFlag (
156
- 'example' ,
157
- defaultsTo: true ,
158
- help: 'Run tests and executables for examples.' ,
159
- )
160
- ..addFlag (
161
- 'format' ,
162
- defaultsTo: true ,
163
- help: 'Run `dart format` on the packages.' ,
164
- )
165
- ..addFlag (
166
- 'generate' ,
167
- defaultsTo: true ,
168
- help: 'Run code generation scripts.' ,
169
- )
170
- ..addFlag (
171
- 'pub' ,
172
- defaultsTo: false ,
173
- help:
174
- 'Run `dart pub get` on the root and non-workspace packages.\n '
175
- 'Run `dart pub global activate coverage`.' ,
176
- )
177
- ..addFlag (
178
- 'test' ,
179
- defaultsTo: true ,
180
- help: 'Run `dart test` on the packages.' ,
181
- );
142
+ final parser = ArgParser ()
143
+ ..addFlag (
144
+ 'help' ,
145
+ abbr: 'h' ,
146
+ negatable: false ,
147
+ help: 'Prints this help message.' ,
148
+ )
149
+ ..addFlag (
150
+ 'analyze' ,
151
+ defaultsTo: true ,
152
+ help: 'Run `dart analyze` on the packages.' ,
153
+ )
154
+ ..addFlag (
155
+ 'coverage' ,
156
+ defaultsTo: false ,
157
+ help: 'Run `dart run coverage:test_with_coverage` on the packages.' ,
158
+ )
159
+ ..addFlag (
160
+ 'example' ,
161
+ defaultsTo: true ,
162
+ help: 'Run tests and executables for examples.' ,
163
+ )
164
+ ..addFlag (
165
+ 'format' ,
166
+ defaultsTo: true ,
167
+ help: 'Run `dart format` on the packages.' ,
168
+ )
169
+ ..addFlag (
170
+ 'generate' ,
171
+ defaultsTo: true ,
172
+ help: 'Run code generation scripts.' ,
173
+ )
174
+ ..addFlag (
175
+ 'pub' ,
176
+ defaultsTo: false ,
177
+ help:
178
+ 'Run `dart pub get` on the root and non-workspace packages.\n '
179
+ 'Run `dart pub global activate coverage`.' ,
180
+ )
181
+ ..addFlag (
182
+ 'test' ,
183
+ defaultsTo: true ,
184
+ help: 'Run `dart test` on the packages.' ,
185
+ );
182
186
return parser;
183
187
}
184
188
@@ -190,13 +194,12 @@ List<String> loadPackagesFromPubspec() {
190
194
File .fromUri (repositoryRoot.resolve ('pubspec.yaml' )).readAsStringSync (),
191
195
);
192
196
final workspace = (pubspecYaml['workspace' ] as List ).cast <String >();
193
- final packages =
194
- workspace
195
- .where (
196
- (package) =>
197
- ! package.contains ('test_data' ) && ! package.contains ('example' ),
198
- )
199
- .toList ();
197
+ final packages = workspace
198
+ .where (
199
+ (package) =>
200
+ ! package.contains ('test_data' ) && ! package.contains ('example' ),
201
+ )
202
+ .toList ();
200
203
return packages;
201
204
}
202
205
0 commit comments