Unverified Commit c93847d1 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Remove IOSDeploy from globals, hoist to XCDevice constructor (#53203)

parent 600a3a74
......@@ -129,13 +129,6 @@ Future<T> runInContext<T>(
FuchsiaWorkflow: () => FuchsiaWorkflow(),
GradleUtils: () => GradleUtils(),
HotRunnerConfig: () => HotRunnerConfig(),
IOSDeploy: () => IOSDeploy(
artifacts: globals.artifacts,
cache: globals.cache,
logger: globals.logger,
platform: globals.platform,
processManager: globals.processManager,
),
IOSSimulatorUtils: () => IOSSimulatorUtils(
simControl: globals.simControl,
xcode: globals.xcode,
......@@ -217,6 +210,13 @@ Future<T> runInContext<T>(
logger: globals.logger,
processManager: globals.processManager,
),
iosDeploy: IOSDeploy(
artifacts: globals.artifacts,
cache: globals.cache,
logger: globals.logger,
platform: globals.platform,
processManager: globals.processManager,
),
xcode: globals.xcode,
),
XcodeProjectInterpreter: () => XcodeProjectInterpreter(
......
......@@ -23,7 +23,6 @@ import 'base/user_messages.dart';
import 'build_system/build_system.dart';
import 'cache.dart';
import 'fuchsia/fuchsia_sdk.dart';
import 'ios/ios_deploy.dart';
import 'ios/ios_workflow.dart';
import 'ios/plist_parser.dart';
import 'ios/simulators.dart';
......@@ -75,7 +74,6 @@ AndroidSdk get androidSdk => context.get<AndroidSdk>();
CocoaPods get cocoaPods => context.get<CocoaPods>();
FlutterVersion get flutterVersion => context.get<FlutterVersion>();
FuchsiaArtifacts get fuchsiaArtifacts => context.get<FuchsiaArtifacts>();
IOSDeploy get iosDeploy => context.get<IOSDeploy>();
IOSSimulatorUtils get iosSimulatorUtils => context.get<IOSSimulatorUtils>();
IOSWorkflow get iosWorkflow => context.get<IOSWorkflow>();
SimControl get simControl => context.get<SimControl>();
......
......@@ -17,6 +17,7 @@ import '../build_info.dart';
import '../convert.dart';
import '../globals.dart' as globals;
import '../ios/devices.dart';
import '../ios/ios_deploy.dart';
import '../ios/mac.dart';
import '../ios/xcodeproj.dart';
import '../reporting/reporting.dart';
......@@ -198,14 +199,17 @@ class XCDevice {
@required Logger logger,
@required Xcode xcode,
@required IMobileDevice iMobileDevice,
@required IOSDeploy iosDeploy,
}) : _processUtils = ProcessUtils(logger: logger, processManager: processManager),
_logger = logger,
_logger = logger,
_iMobileDevice = iMobileDevice,
_xcode = xcode;
_iosDeploy = iosDeploy,
_xcode = xcode;
final ProcessUtils _processUtils;
final Logger _logger;
final IMobileDevice _iMobileDevice;
final IOSDeploy _iosDeploy;
final Xcode _xcode;
bool get isInstalled => _xcode.isInstalledAndMeetsVersionCheck && xcdevicePath != null;
......@@ -359,7 +363,7 @@ class XCDevice {
artifacts: globals.artifacts,
fileSystem: globals.fs,
logger: globals.logger,
iosDeploy: globals.iosDeploy,
iosDeploy: _iosDeploy,
iMobileDevice: _iMobileDevice,
platform: globals.platform,
));
......
......@@ -217,6 +217,7 @@ void main() {
logger: logger,
xcode: mockXcode,
iMobileDevice: null,
iosDeploy: null,
);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment