forked from firka/flutter
committed by
GitHub
parent
df66fecdcf
commit
cf4ef28b94
@@ -42,7 +42,6 @@ import '../web/chrome.dart';
|
||||
import '../web/compile.dart';
|
||||
import '../web/file_generators/flutter_js.dart' as flutter_js;
|
||||
import '../web/memory_fs.dart';
|
||||
import 'sdk_web_configuration.dart';
|
||||
|
||||
typedef DwdsLauncher = Future<Dwds> Function({
|
||||
required AssetReader assetReader,
|
||||
@@ -61,10 +60,9 @@ typedef DwdsLauncher = Future<Dwds> Function({
|
||||
bool enableDevtoolsLaunch,
|
||||
DevtoolsLauncher? devtoolsLauncher,
|
||||
bool launchDevToolsInNewWindow,
|
||||
SdkConfigurationProvider sdkConfigurationProvider,
|
||||
bool emitDebugEvents,
|
||||
bool isInternalBuild,
|
||||
bool isFlutterApp,
|
||||
Future<bool> Function()? isFlutterApp,
|
||||
});
|
||||
|
||||
// A minimal index for projects that do not yet support web.
|
||||
@@ -301,7 +299,6 @@ class WebAssetServer implements AssetReader {
|
||||
).strategy,
|
||||
expressionCompiler: expressionCompiler,
|
||||
spawnDds: enableDds,
|
||||
sdkConfigurationProvider: SdkWebConfigurationProvider(globals.artifacts!),
|
||||
);
|
||||
shelf.Pipeline pipeline = const shelf.Pipeline();
|
||||
if (enableDwds) {
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
// 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 'dart:async';
|
||||
|
||||
// ignore: import_of_legacy_library_into_null_safe
|
||||
import 'package:dwds/dwds.dart';
|
||||
|
||||
import '../artifacts.dart';
|
||||
import '../base/file_system.dart';
|
||||
|
||||
/// Provides paths to SDK files for dart SDK used in flutter.
|
||||
class SdkWebConfigurationProvider extends SdkConfigurationProvider {
|
||||
|
||||
SdkWebConfigurationProvider(this._artifacts);
|
||||
|
||||
final Artifacts _artifacts;
|
||||
SdkConfiguration? _configuration;
|
||||
|
||||
/// Create and validate configuration matching the default SDK layout.
|
||||
/// Create configuration matching the default SDK layout.
|
||||
@override
|
||||
Future<SdkConfiguration> get configuration async {
|
||||
if (_configuration == null) {
|
||||
final String sdkDir = _artifacts.getHostArtifact(HostArtifact.flutterWebSdk).path;
|
||||
final String weakSdkSummaryPath = _artifacts.getHostArtifact(HostArtifact.webPlatformDDCKernelDill).path;
|
||||
final String soundSdkSummaryPath = _artifacts.getHostArtifact(HostArtifact.webPlatformDDCSoundKernelDill).path;
|
||||
final String librariesPath = _artifacts.getHostArtifact(HostArtifact.flutterWebLibrariesJson).path;
|
||||
|
||||
_configuration = SdkConfiguration(
|
||||
sdkDirectory: sdkDir,
|
||||
weakSdkSummaryPath: weakSdkSummaryPath,
|
||||
soundSdkSummaryPath: soundSdkSummaryPath,
|
||||
librariesPath: librariesPath,
|
||||
);
|
||||
}
|
||||
return _configuration!;
|
||||
}
|
||||
|
||||
/// Validate that SDK configuration exists on disk.
|
||||
static void validate(SdkConfiguration configuration, { required FileSystem fileSystem }) {
|
||||
configuration.validateSdkDir(fileSystem: fileSystem);
|
||||
configuration.validateSummaries(fileSystem: fileSystem);
|
||||
configuration.validateLibrariesSpec(fileSystem: fileSystem);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user