mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Remove IOSDeploy from globals, hoist to XCDevice constructor (#53203)
This commit is contained in:
parent
600a3a74ea
commit
c93847d187
@ -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>(
|
|||||||
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';
|
|||||||
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>();
|
|||||||
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';
|
|||||||
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 {
|
|||||||
@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 {
|
|||||||
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() {
|
|||||||
logger: logger,
|
logger: logger,
|
||||||
xcode: mockXcode,
|
xcode: mockXcode,
|
||||||
iMobileDevice: null,
|
iMobileDevice: null,
|
||||||
|
iosDeploy: null,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user