Move plugin injection to just after pub get (#14560)
This commit is contained in:
committed by
GitHub
parent
d260294752
commit
b3e4976ca2
@@ -19,6 +19,7 @@ import 'package:flutter_tools/src/device.dart';
|
||||
import 'package:flutter_tools/src/doctor.dart';
|
||||
import 'package:flutter_tools/src/ios/mac.dart';
|
||||
import 'package:flutter_tools/src/ios/simulators.dart';
|
||||
import 'package:flutter_tools/src/ios/xcodeproj.dart';
|
||||
import 'package:flutter_tools/src/run_hot.dart';
|
||||
import 'package:flutter_tools/src/usage.dart';
|
||||
import 'package:flutter_tools/src/version.dart';
|
||||
@@ -50,6 +51,7 @@ void _defaultInitializeContext(AppContext testContext) {
|
||||
..putIfAbsent(OperatingSystemUtils, () => new MockOperatingSystemUtils())
|
||||
..putIfAbsent(PortScanner, () => new MockPortScanner())
|
||||
..putIfAbsent(Xcode, () => new Xcode())
|
||||
..putIfAbsent(XcodeProjectInterpreter, () => new MockXcodeProjectInterpreter())
|
||||
..putIfAbsent(IOSSimulatorUtils, () {
|
||||
final MockIOSSimulatorUtils mock = new MockIOSSimulatorUtils();
|
||||
when(mock.getAttachedDevices()).thenReturn(<IOSSimulator>[]);
|
||||
@@ -262,6 +264,25 @@ class MockUsage implements Usage {
|
||||
void printWelcome() { }
|
||||
}
|
||||
|
||||
class MockXcodeProjectInterpreter implements XcodeProjectInterpreter {
|
||||
@override
|
||||
bool get canInterpretXcodeProjects => true;
|
||||
|
||||
@override
|
||||
Map<String, String> getBuildSettings(String projectPath, String target) {
|
||||
return <String, String>{};
|
||||
}
|
||||
|
||||
@override
|
||||
XcodeProjectInfo getInfo(String projectPath) {
|
||||
return new XcodeProjectInfo(
|
||||
<String>['Runner'],
|
||||
<String>['Debug', 'Release'],
|
||||
<String>['Runner'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MockFlutterVersion extends Mock implements FlutterVersion {}
|
||||
|
||||
class MockClock extends Mock implements Clock {}
|
||||
|
||||
Reference in New Issue
Block a user