2016-08-29 00:04:48 +02: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 21:22:01 +02:00
|
|
|
|
2018-05-04 02:37:25 +02:00
|
|
|
import 'grind/npm.dart';
|
2019-05-03 21:55:53 +02:00
|
|
|
import 'grind/standalone.dart';
|
2018-05-04 02:37:25 +02:00
|
|
|
import 'grind/synchronize.dart';
|
2016-10-15 00:48:34 +02:00
|
|
|
|
2018-06-19 23:00:06 +02:00
|
|
|
export 'grind/bazel.dart';
|
2018-06-15 20:29:42 +02:00
|
|
|
export 'grind/benchmark.dart';
|
2018-05-04 02:37:25 +02:00
|
|
|
export 'grind/chocolatey.dart';
|
|
|
|
export 'grind/github.dart';
|
|
|
|
export 'grind/homebrew.dart';
|
|
|
|
export 'grind/npm.dart';
|
2019-01-10 01:45:27 +01:00
|
|
|
export 'grind/sanity_check.dart';
|
2018-05-04 02:37:25 +02:00
|
|
|
export 'grind/standalone.dart';
|
|
|
|
export 'grind/synchronize.dart';
|
2018-02-02 03:54:42 +01:00
|
|
|
|
2019-11-06 01:28:26 +01:00
|
|
|
void main(List<String> args) => grind(args);
|
2016-08-29 00:04:48 +02:00
|
|
|
|
2017-11-20 23:30:42 +01:00
|
|
|
@DefaultTask('Compile async code and reformat.')
|
2017-12-01 23:20:49 +01:00
|
|
|
@Depends(format, synchronize)
|
2019-11-06 01:28:26 +01:00
|
|
|
void all() {}
|
2017-11-20 23:30:42 +01:00
|
|
|
|
|
|
|
@Task('Run the Dart formatter.')
|
2019-11-06 01:28:26 +01:00
|
|
|
void format() {
|
2019-05-18 03:02:12 +02:00
|
|
|
Pub.run('dart_style', script: 'format', arguments: [
|
|
|
|
'--overwrite',
|
|
|
|
'--fix',
|
|
|
|
for (var dir in existingSourceDirs) dir.path
|
|
|
|
]);
|
2016-08-29 00:04:48 +02:00
|
|
|
}
|
2016-10-05 10:04:51 +02:00
|
|
|
|
2017-12-01 23:20:49 +01:00
|
|
|
@Task('Installs dependencies from npm.')
|
2019-11-06 01:28:26 +01:00
|
|
|
void npmInstall() => run("npm", arguments: ["install"]);
|
2017-12-01 23:20:49 +01:00
|
|
|
|
|
|
|
@Task('Runs the tasks that are required for running tests.')
|
2019-05-03 21:55:53 +02:00
|
|
|
@Depends(format, synchronize, npmPackage, npmInstall, appSnapshot)
|
2019-11-06 01:28:26 +01:00
|
|
|
void beforeTest() {}
|