anchor.diff:        }
       }
   
  +    if (argResults['current-directory']) {
  +      // ./*.dart
  +      Directory currentDirectory = new Directory('.');
  +      bool foundOne = false;
  +      for (FileSystemEntity entry in currentDirectory.listSync()) {
  +        if (isDartFile(entry)) {
  +          dartFiles.add(entry.path);
  +          foundOne = true;
  +        }
  +      }
  +      if (foundOne) {
  +        pubSpecDirectories.add('.');
  +        foundAnyInCurrentDirectory = true;
  +      }
  +    }
  +
  +    if (argResults['current-package']) {
  +      if (_addPackage('.', dartFiles, pubSpecDirectories))
  +        foundAnyInCurrentDirectory = true;
  +    }
  +
       if (argResults['flutter-repo']) {
  -      // .../examples/*/*.dart
  -      // .../examples/*/lib/main.dart
  -      Directory examples = new Directory(path.join(ArtifactStore.flutterRoot, 'examples'));
  -      for (FileSystemEntity entry in examples.listSync()) {
  -        if (entry is Directory) {
  -          bool foundOne = false;
  -          for (FileSystemEntity subentry in entry.listSync()) {
  -            if (subentry is File && subentry.path.endsWith('.dart')) {
  -              dartFiles.add(subentry.path);
  -              foundOne = true;
  -            } else if (subentry is Directory && path.basename(subentry.path) == 'lib') {
  -              String mainPath = path.join(subentry.path, 'main.dart');
  -              if (FileSystemEntity.isFileSync(mainPath)) {
  -                dartFiles.add(mainPath);
  -                foundOne = true;
  -              }
  -            }
  -          }
  -          if (foundOne)
  -            pubSpecDirectories.add(entry.path);
  -        }
  -      }
  -
  -      // .../packages/*/bin/*.dart
  -      // .../packages/*/lib/main.dart
  -      // .../packages/*/test/*_test.dart
  -      // .../packages/*/test/*/*_test.dart
  -      // .../packages/*/benchmark/*/*_bench.dart
  -      Directory packages = new Directory(path.join(ArtifactStore.flutterRoot, 'packages'));
  -      for (FileSystemEntity entry in packages.listSync()) {
  -        if (entry is Directory) {
  -          bool foundOne = false;
  -
  -          Directory binDirectory = new Directory(path.join(entry.path, 'bin'));
  -          if (binDirectory.existsSync()) {
  -            for (FileSystemEntity subentry in binDirectory.listSync()) {
  -              if (subentry is File && subentry.path.endsWith('.dart')) {
  +
  +      //examples/*/ as package
  +      //examples/layers/*/ as files
  +      //dev/manual_tests/*/ as package
  +      //dev/manual_tests/*/ as files
  +
  +      Directory subdirectory;
  +
  +      subdirectory = new Directory(path.join(ArtifactStore.flutterRoot, 'packages'));
  +      if (subdirectory.existsSync()) {
  +        for (FileSystemEntity entry in subdirectory.listSync()) {
  +          if (entry is Directory)
  +            _addPackage(entry.path, dartFiles, pubSpecDirectories);
  +        }
  +      }
  +
  +      subdirectory = new Directory(path.join(ArtifactStore.flutterRoot, 'examples'));
  +      if (subdirectory.existsSync()) {
  +        for (FileSystemEntity entry in subdirectory.listSync()) {
  +          if (entry is Directory)
  +            _addPackage(entry.path, dartFiles, pubSpecDirectories);
  +        }
  +      }
  +
  +      subdirectory = new Directory(path.join(ArtifactStore.flutterRoot, 'examples', 'layers'));
  +      if (subdirectory.existsSync()) {
  +        bool foundOne = false;
  +        for (FileSystemEntity entry in subdirectory.listSync()) {
  +          if (entry is Directory) {
  +            for (FileSystemEntity subentry in entry.listSync()) {
  +              if (isDartFile(subentry)) {
                   dartFiles.add(subentry.path);
                   foundOne = true;
                 }
               }
             }
  -
  -          String mainPath = path.join(entry.path, 'lib', 'main.dart');
  -          if (FileSystemEntity.isFileSync(mainPath)) {
  -            dartFiles.add(mainPath);
  +        }
  +        if (foundOne)
  +          pubSpecDirectories.add(subdirectory.path);
  +      }
  +
  +      subdirectory = new Directory(path.join(ArtifactStore.flutterRoot, 'dev', 'manual_tests'));
  +      if (subdirectory.existsSync()) {
  +        bool foundOne = false;
  +        for (FileSystemEntity entry in subdirectory.listSync()) {
  +          if (entry is Directory) {
  +            _addPackage(entry.path, dartFiles, pubSpecDirectories);
  +          } else if (isDartFile(entry)) {
  +            dartFiles.add(entry.path);
               foundOne = true;
             }
  -
  -          Directory testDirectory = new Directory(path.join(entry.path, 'test'));
  -          if (testDirectory.existsSync()) {
  -            for (FileSystemEntity entry in testDirectory.listSync()) {
  -              if (entry is Directory) {
  -                for (FileSystemEntity subentry in entry.listSync()) {
  -                  if (subentry is File && subentry.path.endsWith('_test.dart')) {
  -                    dartFiles.add(subentry.path);
  -                    foundOne = true;
  -                  }
  -                }
  -              } else if (entry is File && entry.path.endsWith('_test.dart')) {
  -                dartFiles.add(entry.path);
  -                foundOne = true;
  -              }
  -            }
  -          }
  -
  -          Directory benchmarkDirectory = new Directory(path.join(entry.path, 'benchmark'));
  -          if (benchmarkDirectory.existsSync()) {
  -            for (FileSystemEntity entry in benchmarkDirectory.listSync()) {
  -              if (entry is Directory) {
  -                for (FileSystemEntity subentry in entry.listSync()) {
  -                  if (subentry is File && subentry.path.endsWith('_bench.dart')) {
  -                    dartFiles.add(subentry.path);
  -                    foundOne = true;
  -                  }
  -                }
  -              } else if (entry is File && entry.path.endsWith('_bench.dart')) {
  -                dartFiles.add(entry.path);
  -                foundOne = true;
  -              }
  -            }
  -          }
  -
  -          if (foundOne)
  -            pubSpecDirectories.add(entry.path);
  -        }
  -      }
  -    }
  -
  -    if (argResults['current-directory']) {
  -      // ./*.dart
  -      Directory currentDirectory = new Directory('.');
  -      bool foundOne = false;
  -      for (FileSystemEntity entry in currentDirectory.listSync()) {
  -        if (entry is File && entry.path.endsWith('.dart')) {
  -          dartFiles.add(entry.path);
  -          foundOne = true;
  -        }
  -      }
  -      if (foundOne) {
  -        pubSpecDirectories.add('.');
  -        foundAnyInCurrentDirectory = true;
  -      }
  -    }
  -
  -    if (argResults['current-package']) {
  -      // ./lib/main.dart
  -      String mainPath = 'lib/main.dart';
  -      if (FileSystemEntity.isFileSync(mainPath)) {
  -        dartFiles.add(mainPath);
  -        pubSpecDirectories.add('.');
  -        foundAnyInCurrentDirectory = true;
  -      }
  -    }
  +        }
  +        if (foundOne)
  +          pubSpecDirectories.add(subdirectory.path);
  +      }
  +
  +    }
  +
  +    dartFiles = dartFiles.map((String directory) => path.normalize(path.absolute(directory))).toSet().toList();    
  +    dartFiles.sort();
   
       // prepare a Dart file that references all the above Dart files
       StringBuffer mainBody = new StringBuffer();
       for (int index = 0; index < dartFiles.length; index += 1)
  -      mainBody.writeln('import \'${path.normalize(path.absolute(dartFiles[index]))}\' as file$index;');
  +      mainBody.writeln('import \'${dartFiles[index]}\' as file$index;');
       mainBody.writeln('void main() { }');
   
       // prepare a union of all the .packages files
  
positive.code:     }
      if (hadInconsistentRequirements) {
        if (foundAnyInFlutterRepo)
          printError('You may need to run "dart ${path.normalize(path.relative(path.join(ArtifactStore.flutterRoot, 'dev/update_packages.dart')))} --upgrade".');
        if (foundAnyInCurrentDirectory)
          printError('You may need to run "pub upgrade".');
      }
  
negative.code:     stopwatch.stop();
      String elapsed = (stopwatch.elapsedMilliseconds / 1000.0).toStringAsFixed(1);
  
      host.deleteSync(recursive: true);
  
      if (exitCode < 0 || exitCode > 3) // 0 = nothing, 1 = hints, 2 = warnings, 3 = errors
        return exitCode;
  
  