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(),
|
||||
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,
|
||||
);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user