Fix error with 'flutter packages get' in package projects (#16861)

Package projects were erroneously being treated as apps
This commit is contained in:
PJ Essien
2018-04-23 02:03:46 +01:00
committed by Todd Volkert
parent fb18ac650e
commit fd7222eea8
5 changed files with 36 additions and 25 deletions

View File

@@ -23,11 +23,11 @@ void main() {
project.ensureReadyForPlatformSpecificTooling();
expect(project.directory.existsSync(), isFalse);
});
testInMemory('does nothing in plugin root project', () async {
testInMemory('does nothing in plugin or package root project', () async {
final FlutterProject project = aPluginProject();
project.ensureReadyForPlatformSpecificTooling();
expect(project.example.ios.directory.childFile('Runner/GeneratedPluginRegistrant.h').existsSync(), isFalse);
expect(project.example.ios.directory.childFile('Flutter/Generated.xcconfig').existsSync(), isFalse);
expect(project.ios.directory.childFile('Runner/GeneratedPluginRegistrant.h').existsSync(), isFalse);
expect(project.ios.directory.childFile('Flutter/Generated.xcconfig').existsSync(), isFalse);
});
testInMemory('injects plugins', () async {
final FlutterProject project = aProjectWithIos();