anchor.diff:  }
   
   /// Generates a fake app bundle at the location [directoryName]/[fileName].
  -FlutterProject generateFakeAppBundle(String directoryName, String fileName) {
  +FlutterProject generateFakeAppBundle(String directoryName, String fileName, FileSystem fileSystem) {
     final FlutterProject project = MockFlutterProject();
     final AndroidProject androidProject = MockAndroidProject();
   
     when(project.isModule).thenReturn(false);
     when(project.android).thenReturn(androidProject);
  -  when(androidProject.buildDirectory).thenReturn(globals.fs.directory('irrelevant'));
  +  when(androidProject.buildDirectory).thenReturn(fileSystem.directory('irrelevant'));
   
     final Directory bundleDirectory = getBundleDirectory(project);
     bundleDirectory
  
positive.code:   Cache.flutterRoot = getFlutterRoot();
  
    group('build artifacts', () {
      test('getApkDirectory in app projects', () {
        final FlutterProject project = MockFlutterProject();
        final AndroidProject androidProject = MockAndroidProject();
        when(project.android).thenReturn(androidProject);
        when(project.isModule).thenReturn(false);
        when(androidProject.buildDirectory).thenReturn(globals.fs.directory('foo'));
  
        expect(
          getApkDirectory(project).path,
          equals(globals.fs.path.join('foo', 'app', 'outputs', 'flutter-apk')),
        );
      });
  
      test('getApkDirectory in module projects', () {
        final FlutterProject project = MockFlutterProject();
        final AndroidProject androidProject = MockAndroidProject();
        when(project.android).thenReturn(androidProject);
        when(project.isModule).thenReturn(true);
        when(androidProject.buildDirectory).thenReturn(globals.fs.directory('foo'));
  
        expect(
          getApkDirectory(project).path,
          equals(globals.fs.path.join('foo', 'host', 'outputs', 'apk')),
        );
      });
  
      test('getBundleDirectory in app projects', () {
        final FlutterProject project = MockFlutterProject();
        final AndroidProject androidProject = MockAndroidProject();
        when(project.android).thenReturn(androidProject);
        when(project.isModule).thenReturn(false);
        when(androidProject.buildDirectory).thenReturn(globals.fs.directory('foo'));
  
        expect(
          getBundleDirectory(project).path,
          equals(globals.fs.path.join('foo', 'app', 'outputs', 'bundle')),
        );
      });
  
      test('getBundleDirectory in module projects', () {
        final FlutterProject project = MockFlutterProject();
        final AndroidProject androidProject = MockAndroidProject();
        when(project.android).thenReturn(androidProject);
        when(project.isModule).thenReturn(true);
        when(androidProject.buildDirectory).thenReturn(globals.fs.directory('foo'));
  
        expect(
          getBundleDirectory(project).path,
          equals(globals.fs.path.join('foo', 'host', 'outputs', 'bundle')),
        );
      });
  
      test('getRepoDirectory', () {
        expect(
          getRepoDirectory(globals.fs.directory('foo')).path,
          equals(globals.fs.path.join('foo','outputs', 'repo')),
        );
      });
    });
  
    group('gradle tasks', () {
      test('assemble release', () {
        expect(
          getAssembleTaskFor(const BuildInfo(BuildMode.release, null, treeShakeIcons: false)),
          equals('assembleRelease'),
  
negative.code:       expect(getGradleVersionFor('3.5.0'), '5.6.2');
      });
  
      testWithoutContext('throws on unsupported versions', () {
        expect(() => getGradleVersionFor('3.6.0'),
            throwsA(predicate<Exception>((Exception e) => e is ToolExit)));
      });
  