make FlutterProject synchronous (#31757)

This commit is contained in:
Jonah Williams
2019-04-29 08:21:32 -07:00
committed by GitHub
parent 5412ef07f2
commit 4ff467191b
50 changed files with 137 additions and 136 deletions

View File

@@ -170,7 +170,7 @@ flutter:
module: {}
''');
fs.file('.packages').createSync();
final FlutterProject flutterProject = await FlutterProject.current();
final FlutterProject flutterProject = FlutterProject.current();
expect(AndroidDevice('test').isSupportedForProject(flutterProject), true);
}, overrides: <Type, Generator>{
@@ -181,7 +181,7 @@ flutter:
fs.file('pubspec.yaml').createSync();
fs.file('.packages').createSync();
fs.directory('android').createSync();
final FlutterProject flutterProject = await FlutterProject.current();
final FlutterProject flutterProject = FlutterProject.current();
expect(AndroidDevice('test').isSupportedForProject(flutterProject), true);
}, overrides: <Type, Generator>{
@@ -191,7 +191,7 @@ flutter:
testUsingContext('isSupportedForProject is false with no host app and no module', () async {
fs.file('pubspec.yaml').createSync();
fs.file('.packages').createSync();
final FlutterProject flutterProject = await FlutterProject.current();
final FlutterProject flutterProject = FlutterProject.current();
expect(AndroidDevice('test').isSupportedForProject(flutterProject), false);
}, overrides: <Type, Generator>{

View File

@@ -33,7 +33,7 @@ void main() {
// This test is written to fail if our bots get Android SDKs in the future: shouldBeToolExit
// will be null and our expectation would fail. That would remind us to make these tests
// hermetic before adding Android SDKs to the bots.
updateLocalProperties(project: await FlutterProject.current());
updateLocalProperties(project: FlutterProject.current());
} on Exception catch (e) {
shouldBeToolExit = e;
}
@@ -264,7 +264,7 @@ someOtherTask
writeEmptySchemaFile(fs);
updateLocalProperties(
project: await FlutterProject.fromPath('path/to/project'),
project: FlutterProject.fromPath('path/to/project'),
buildInfo: buildInfo,
requireAndroidSdk: false,
);