@@ -50,7 +50,7 @@ Directory createTempSync(String prefix) =>
50
50
final Memoizer tempdirsCache = new Memoizer ();
51
51
52
52
/// Global so that the lock is retained for the life of the process.
53
- Future <Null > _lockFuture;
53
+ Future <void > _lockFuture;
54
54
Completer <FlutterRepo > _cleanFlutterRepo;
55
55
56
56
/// Returns true if we need to replace the existing flutter. We never release
@@ -337,7 +337,7 @@ Future<List<Map>> _buildSdkDocs(String sdkDocsPath, Future<String> futureCwd,
337
337
return await launcher.runStreamed (
338
338
Platform .resolvedExecutable,
339
339
[
340
- '--checked ' ,
340
+ '--enable-asserts ' ,
341
341
pathLib.join ('bin' , 'dartdoc.dart' ),
342
342
'--output' ,
343
343
'${sdkDocsPath }' ,
@@ -361,7 +361,7 @@ Future<List<Map>> _buildTestPackageDocs(
361
361
return await launcher.runStreamed (
362
362
Platform .resolvedExecutable,
363
363
[
364
- '--checked ' ,
364
+ '--enable-asserts ' ,
365
365
pathLib.join (cwd, 'bin' , 'dartdoc.dart' ),
366
366
'--output' ,
367
367
outputDir,
@@ -520,7 +520,7 @@ class FlutterRepo {
520
520
new SubprocessLauncher ('flutter${label == null ? "" : "-$label " }' , env);
521
521
}
522
522
523
- Future <Null > _init () async {
523
+ Future <void > _init () async {
524
524
new Directory (flutterPath).createSync (recursive: true );
525
525
await launcher.runStreamed (
526
526
'git' , ['clone' , 'https://github.com/flutter/flutter.git' , '.' ],
@@ -605,7 +605,7 @@ Future<String> _buildPubPackageDocs(String pubPackageName,
605
605
await launcher.runStreamed (
606
606
Platform .resolvedExecutable,
607
607
[
608
- '--checked ' ,
608
+ '--enable-asserts ' ,
609
609
pathLib.join (Directory .current.absolute.path, 'bin' , 'dartdoc.dart' ),
610
610
'--json' ,
611
611
'--show-progress' ,
@@ -654,7 +654,8 @@ _getPackageVersion() {
654
654
@Task ('Rebuild generated files' )
655
655
build () async {
656
656
var launcher = new SubprocessLauncher ('build' );
657
- await launcher.runStreamed (sdkBin ('pub' ), ['run' , 'build_runner' , 'build' , '--delete-conflicting-outputs' ]);
657
+ await launcher.runStreamed (sdkBin ('pub' ),
658
+ ['run' , 'build_runner' , 'build' , '--delete-conflicting-outputs' ]);
658
659
}
659
660
660
661
/// Paths in this list are relative to lib/.
@@ -677,7 +678,8 @@ checkBuild() async {
677
678
}
678
679
}
679
680
680
- await launcher.runStreamed (sdkBin ('pub' ), ['run' , 'build_runner' , 'build' , '--delete-conflicting-outputs' ]);
681
+ await launcher.runStreamed (sdkBin ('pub' ),
682
+ ['run' , 'build_runner' , 'build' , '--delete-conflicting-outputs' ]);
681
683
for (String relPath in _generated_files_list) {
682
684
File newVersion = new File (pathLib.join ('lib' , relPath));
683
685
if (! await newVersion.exists ()) {
@@ -707,25 +709,24 @@ publish() async {
707
709
708
710
@Task ('Run all the tests.' )
709
711
test () async {
710
- await testPreviewDart2 ();
711
- await testDart1 ();
712
+ await testDart2 ();
712
713
await testFutures.wait ();
713
714
}
714
715
715
716
List <File > get binFiles => new Directory ('bin' )
716
717
.listSync (recursive: true )
717
718
.where ((e) => e is File && e.path.endsWith ('.dart' ))
718
719
.cast <File >()
719
- . .toList ();
720
+ .toList ();
720
721
721
722
List <File > get testFiles => new Directory ('test' )
722
723
.listSync (recursive: true )
723
724
.where ((e) => e is File && e.path.endsWith ('test.dart' ))
724
725
.cast <File >()
725
- . .toList ();
726
+ .toList ();
726
727
727
- testPreviewDart2 () async {
728
- List <String > parameters = ['--preview-dart-2' , '-- enable-asserts' ];
728
+ testDart2 () async {
729
+ List <String > parameters = ['--enable-asserts' ];
729
730
730
731
for (File dartFile in testFiles) {
731
732
await testFutures.addFuture (
@@ -749,35 +750,15 @@ testPreviewDart2() async {
749
750
}
750
751
}
751
752
752
- testDart1 () async {
753
- List <String > parameters = ['--checked' ];
754
- for (File dartFile in testFiles) {
755
- await testFutures.addFuture (
756
- new SubprocessLauncher ('dart1-${pathLib .basename (dartFile .path )}' )
757
- .runStreamed (
758
- Platform .resolvedExecutable,
759
- < String > []
760
- ..addAll (parameters)
761
- ..add (dartFile.path)));
762
- }
763
-
764
- for (File dartFile in binFiles) {
765
- await testFutures.addFuture (new SubprocessLauncher (
766
- 'dart1-bin-${pathLib .basename (dartFile .path )}-help' )
767
- .runStreamed (
768
- Platform .resolvedExecutable,
769
- < String > []
770
- ..addAll (parameters)
771
- ..add (dartFile.path)
772
- ..add ('--help' )));
773
- }
774
- }
775
-
776
753
@Task ('Generate docs for dartdoc' )
777
754
testDartdoc () async {
778
755
var launcher = new SubprocessLauncher ('test-dartdoc' );
779
- await launcher.runStreamed (Platform .resolvedExecutable,
780
- ['--checked' , 'bin/dartdoc.dart' , '--output' , dartdocDocsDir.path]);
756
+ await launcher.runStreamed (Platform .resolvedExecutable, [
757
+ '--enable-asserts' ,
758
+ 'bin/dartdoc.dart' ,
759
+ '--output' ,
760
+ dartdocDocsDir.path
761
+ ]);
781
762
expectFileContains (pathLib.join (dartdocDocsDir.path, 'index.html' ),
782
763
['<title>dartdoc - Dart API docs</title>' ]);
783
764
final RegExp object = new RegExp ('<li>Object</li>' , multiLine: true );
@@ -793,7 +774,7 @@ testDartdocRemote() async {
793
774
'<a href="https://api.dartlang.org/(dev|stable)/[^/]*/dart-core/Object-class.html">Object</a>' ,
794
775
multiLine: true );
795
776
await launcher.runStreamed (Platform .resolvedExecutable, [
796
- '--checked ' ,
777
+ '--enable-asserts ' ,
797
778
'bin/dartdoc.dart' ,
798
779
'--link-to-remote' ,
799
780
'--output' ,
@@ -821,7 +802,7 @@ Future<WarningsCollection> _buildDartdocFlutterPluginDocs() async {
821
802
await flutterRepo.launcher.runStreamed (
822
803
Platform .resolvedExecutable,
823
804
[
824
- '--checked ' ,
805
+ '--enable-asserts ' ,
825
806
pathLib.join (Directory .current.path, 'bin' , 'dartdoc.dart' ),
826
807
'--json' ,
827
808
'--link-to-remote' ,
@@ -869,7 +850,7 @@ updateTestPackageDocs() async {
869
850
await launcher.runStreamed (
870
851
Platform .resolvedExecutable,
871
852
[
872
- '--checked ' ,
853
+ '--enable-asserts ' ,
873
854
pathLib.join ('..' , '..' , 'bin' , 'dartdoc.dart' ),
874
855
'--auto-include-dependencies' ,
875
856
'--example-path-prefix' ,
0 commit comments