flutter_flutter/packages/flutter_tools/lib/src/flutter_device_manager.dart
zijiehe@ a4f45471bc
Delete packages/flutter_tools/lib/src/fuchsia directory (#154880)
It's not being actively used, and fuchsia team does not have bandwidth
to maintain it.

Bug: https://b.corp.google.com/issues/353729557

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2024-09-17 09:10:02 -07:00

140 lines
4.1 KiB
Dart

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:process/process.dart';
import 'android/android_device_discovery.dart';
import 'android/android_sdk.dart';
import 'android/android_workflow.dart';
import 'artifacts.dart';
import 'base/file_system.dart';
import 'base/os.dart';
import 'base/platform.dart';
import 'base/user_messages.dart';
import 'custom_devices/custom_device.dart';
import 'custom_devices/custom_devices_config.dart';
import 'device.dart';
import 'features.dart';
import 'ios/devices.dart';
import 'ios/ios_workflow.dart';
import 'ios/simulators.dart';
import 'linux/linux_device.dart';
import 'macos/macos_device.dart';
import 'macos/macos_ipad_device.dart';
import 'macos/macos_workflow.dart';
import 'macos/xcdevice.dart';
import 'native_assets.dart';
import 'preview_device.dart';
import 'tester/flutter_tester.dart';
import 'version.dart';
import 'web/web_device.dart';
import 'windows/windows_device.dart';
import 'windows/windows_workflow.dart';
/// A provider for all of the device discovery instances.
class FlutterDeviceManager extends DeviceManager {
FlutterDeviceManager({
required super.logger,
required Platform platform,
required ProcessManager processManager,
required FileSystem fileSystem,
required AndroidSdk? androidSdk,
required FeatureFlags featureFlags,
required IOSSimulatorUtils iosSimulatorUtils,
required XCDevice xcDevice,
required AndroidWorkflow androidWorkflow,
required IOSWorkflow iosWorkflow,
required FlutterVersion flutterVersion,
required Artifacts artifacts,
required MacOSWorkflow macOSWorkflow,
required UserMessages userMessages,
required OperatingSystemUtils operatingSystemUtils,
required WindowsWorkflow windowsWorkflow,
required CustomDevicesConfig customDevicesConfig,
required TestCompilerNativeAssetsBuilder? nativeAssetsBuilder,
}) : deviceDiscoverers = <DeviceDiscovery>[
AndroidDevices(
logger: logger,
androidSdk: androidSdk,
androidWorkflow: androidWorkflow,
processManager: processManager,
fileSystem: fileSystem,
platform: platform,
userMessages: userMessages,
),
IOSDevices(
platform: platform,
xcdevice: xcDevice,
iosWorkflow: iosWorkflow,
logger: logger,
),
IOSSimulators(
iosSimulatorUtils: iosSimulatorUtils,
),
FlutterTesterDevices(
fileSystem: fileSystem,
flutterVersion: flutterVersion,
processManager: processManager,
logger: logger,
artifacts: artifacts,
nativeAssetsBuilder: nativeAssetsBuilder,
),
MacOSDevices(
processManager: processManager,
macOSWorkflow: macOSWorkflow,
logger: logger,
platform: platform,
fileSystem: fileSystem,
operatingSystemUtils: operatingSystemUtils,
),
MacOSDesignedForIPadDevices(
processManager: processManager,
iosWorkflow: iosWorkflow,
logger: logger,
platform: platform,
fileSystem: fileSystem,
operatingSystemUtils: operatingSystemUtils,
),
PreviewDeviceDiscovery(
platform: platform,
artifacts: artifacts,
fileSystem: fileSystem,
logger: logger,
processManager: processManager,
featureFlags: featureFlags,
),
LinuxDevices(
platform: platform,
featureFlags: featureFlags,
processManager: processManager,
logger: logger,
fileSystem: fileSystem,
operatingSystemUtils: operatingSystemUtils,
),
WindowsDevices(
processManager: processManager,
operatingSystemUtils: operatingSystemUtils,
logger: logger,
fileSystem: fileSystem,
windowsWorkflow: windowsWorkflow,
),
WebDevices(
featureFlags: featureFlags,
fileSystem: fileSystem,
platform: platform,
processManager: processManager,
logger: logger,
),
CustomDevices(
featureFlags: featureFlags,
processManager: processManager,
logger: logger,
config: customDevicesConfig
),
];
@override
final List<DeviceDiscovery> deviceDiscoverers;
}