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>( ...@@ -129,13 +129,6 @@ Future<T> runInContext<T>(
FuchsiaWorkflow: () => FuchsiaWorkflow(), FuchsiaWorkflow: () => FuchsiaWorkflow(),
GradleUtils: () => GradleUtils(), GradleUtils: () => GradleUtils(),
HotRunnerConfig: () => HotRunnerConfig(), HotRunnerConfig: () => HotRunnerConfig(),
IOSDeploy: () => IOSDeploy(
artifacts: globals.artifacts,
cache: globals.cache,
logger: globals.logger,
platform: globals.platform,
processManager: globals.processManager,
),
IOSSimulatorUtils: () => IOSSimulatorUtils( IOSSimulatorUtils: () => IOSSimulatorUtils(
simControl: globals.simControl, simControl: globals.simControl,
xcode: globals.xcode, xcode: globals.xcode,
...@@ -217,6 +210,13 @@ Future<T> runInContext<T>( ...@@ -217,6 +210,13 @@ Future<T> runInContext<T>(
logger: globals.logger, logger: globals.logger,
processManager: globals.processManager, processManager: globals.processManager,
), ),
iosDeploy: IOSDeploy(
artifacts: globals.artifacts,
cache: globals.cache,
logger: globals.logger,
platform: globals.platform,
processManager: globals.processManager,
),
xcode: globals.xcode, xcode: globals.xcode,
), ),
XcodeProjectInterpreter: () => XcodeProjectInterpreter( XcodeProjectInterpreter: () => XcodeProjectInterpreter(
......
...@@ -23,7 +23,6 @@ import 'base/user_messages.dart'; ...@@ -23,7 +23,6 @@ import 'base/user_messages.dart';
import 'build_system/build_system.dart'; import 'build_system/build_system.dart';
import 'cache.dart'; import 'cache.dart';
import 'fuchsia/fuchsia_sdk.dart'; import 'fuchsia/fuchsia_sdk.dart';
import 'ios/ios_deploy.dart';
import 'ios/ios_workflow.dart'; import 'ios/ios_workflow.dart';
import 'ios/plist_parser.dart'; import 'ios/plist_parser.dart';
import 'ios/simulators.dart'; import 'ios/simulators.dart';
...@@ -75,7 +74,6 @@ AndroidSdk get androidSdk => context.get<AndroidSdk>(); ...@@ -75,7 +74,6 @@ AndroidSdk get androidSdk => context.get<AndroidSdk>();
CocoaPods get cocoaPods => context.get<CocoaPods>(); CocoaPods get cocoaPods => context.get<CocoaPods>();
FlutterVersion get flutterVersion => context.get<FlutterVersion>(); FlutterVersion get flutterVersion => context.get<FlutterVersion>();
FuchsiaArtifacts get fuchsiaArtifacts => context.get<FuchsiaArtifacts>(); FuchsiaArtifacts get fuchsiaArtifacts => context.get<FuchsiaArtifacts>();
IOSDeploy get iosDeploy => context.get<IOSDeploy>();
IOSSimulatorUtils get iosSimulatorUtils => context.get<IOSSimulatorUtils>(); IOSSimulatorUtils get iosSimulatorUtils => context.get<IOSSimulatorUtils>();
IOSWorkflow get iosWorkflow => context.get<IOSWorkflow>(); IOSWorkflow get iosWorkflow => context.get<IOSWorkflow>();
SimControl get simControl => context.get<SimControl>(); SimControl get simControl => context.get<SimControl>();
......
...@@ -17,6 +17,7 @@ import '../build_info.dart'; ...@@ -17,6 +17,7 @@ import '../build_info.dart';
import '../convert.dart'; import '../convert.dart';
import '../globals.dart' as globals; import '../globals.dart' as globals;
import '../ios/devices.dart'; import '../ios/devices.dart';
import '../ios/ios_deploy.dart';
import '../ios/mac.dart'; import '../ios/mac.dart';
import '../ios/xcodeproj.dart'; import '../ios/xcodeproj.dart';
import '../reporting/reporting.dart'; import '../reporting/reporting.dart';
...@@ -198,14 +199,17 @@ class XCDevice { ...@@ -198,14 +199,17 @@ class XCDevice {
@required Logger logger, @required Logger logger,
@required Xcode xcode, @required Xcode xcode,
@required IMobileDevice iMobileDevice, @required IMobileDevice iMobileDevice,
@required IOSDeploy iosDeploy,
}) : _processUtils = ProcessUtils(logger: logger, processManager: processManager), }) : _processUtils = ProcessUtils(logger: logger, processManager: processManager),
_logger = logger, _logger = logger,
_iMobileDevice = iMobileDevice, _iMobileDevice = iMobileDevice,
_xcode = xcode; _iosDeploy = iosDeploy,
_xcode = xcode;
final ProcessUtils _processUtils; final ProcessUtils _processUtils;
final Logger _logger; final Logger _logger;
final IMobileDevice _iMobileDevice; final IMobileDevice _iMobileDevice;
final IOSDeploy _iosDeploy;
final Xcode _xcode; final Xcode _xcode;
bool get isInstalled => _xcode.isInstalledAndMeetsVersionCheck && xcdevicePath != null; bool get isInstalled => _xcode.isInstalledAndMeetsVersionCheck && xcdevicePath != null;
...@@ -359,7 +363,7 @@ class XCDevice { ...@@ -359,7 +363,7 @@ class XCDevice {
artifacts: globals.artifacts, artifacts: globals.artifacts,
fileSystem: globals.fs, fileSystem: globals.fs,
logger: globals.logger, logger: globals.logger,
iosDeploy: globals.iosDeploy, iosDeploy: _iosDeploy,
iMobileDevice: _iMobileDevice, iMobileDevice: _iMobileDevice,
platform: globals.platform, platform: globals.platform,
)); ));
......
...@@ -217,6 +217,7 @@ void main() { ...@@ -217,6 +217,7 @@ void main() {
logger: logger, logger: logger,
xcode: mockXcode, xcode: mockXcode,
iMobileDevice: null, 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