2016-08-28 15:04:48 -07:00
|
|
|
// Copyright 2016 Google Inc. Use of this source code is governed by an
|
|
|
|
// MIT-style license that can be found in the LICENSE file or at
|
|
|
|
// https://opensource.org/licenses/MIT.
|
|
|
|
|
|
|
|
import 'package:grinder/grinder.dart';
|
2017-10-12 12:22:01 -07:00
|
|
|
|
2018-05-03 17:37:25 -07:00
|
|
|
import 'grind/npm.dart';
|
2019-05-03 12:55:53 -07:00
|
|
|
import 'grind/standalone.dart';
|
2018-05-03 17:37:25 -07:00
|
|
|
import 'grind/synchronize.dart';
|
2016-10-14 15:48:34 -07:00
|
|
|
|
2018-06-19 14:00:06 -07:00
|
|
|
export 'grind/bazel.dart';
|
2018-06-15 11:29:42 -07:00
|
|
|
export 'grind/benchmark.dart';
|
2018-05-03 17:37:25 -07:00
|
|
|
export 'grind/chocolatey.dart';
|
|
|
|
export 'grind/github.dart';
|
|
|
|
export 'grind/homebrew.dart';
|
|
|
|
export 'grind/npm.dart';
|
2019-01-09 19:45:27 -05:00
|
|
|
export 'grind/sanity_check.dart';
|
2018-05-03 17:37:25 -07:00
|
|
|
export 'grind/standalone.dart';
|
|
|
|
export 'grind/synchronize.dart';
|
2018-02-01 18:54:42 -08:00
|
|
|
|
2017-01-08 14:31:26 -08:00
|
|
|
main(List<String> args) => grind(args);
|
2016-08-28 15:04:48 -07:00
|
|
|
|
2017-11-20 14:30:42 -08:00
|
|
|
@DefaultTask('Compile async code and reformat.')
|
2017-12-01 14:20:49 -08:00
|
|
|
@Depends(format, synchronize)
|
|
|
|
all() {}
|
2017-11-20 14:30:42 -08:00
|
|
|
|
|
|
|
@Task('Run the Dart formatter.')
|
2016-08-28 15:04:48 -07:00
|
|
|
format() {
|
2019-05-17 18:02:12 -07:00
|
|
|
Pub.run('dart_style', script: 'format', arguments: [
|
|
|
|
'--overwrite',
|
|
|
|
'--fix',
|
|
|
|
for (var dir in existingSourceDirs) dir.path
|
|
|
|
]);
|
2016-08-28 15:04:48 -07:00
|
|
|
}
|
2016-10-05 01:04:51 -07:00
|
|
|
|
2017-12-01 14:20:49 -08:00
|
|
|
@Task('Installs dependencies from npm.')
|
2018-06-25 16:39:35 -07:00
|
|
|
npmInstall() => run("npm", arguments: ["install"]);
|
2017-12-01 14:20:49 -08:00
|
|
|
|
|
|
|
@Task('Runs the tasks that are required for running tests.')
|
2019-05-03 12:55:53 -07:00
|
|
|
@Depends(format, synchronize, npmPackage, npmInstall, appSnapshot)
|
2018-06-25 16:39:35 -07:00
|
|
|
beforeTest() {}
|