Skip to content

Commit

Permalink
inline method
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Nov 16, 2023
1 parent 1cd05ec commit c64f4d9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkgs/dart_services/tool/grind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ Future<void> serve() async {
]);
}

/// Creates an SDK.
Sdk _getSdk() => Sdk();

final List<String> compilationArtifacts = [
'dart_sdk.js',
'flutter_web.js',
Expand All @@ -44,7 +41,7 @@ final List<String> compilationArtifacts = [
'google storage')
void validateStorageArtifacts() async {
final args = context.invocation.arguments;
final sdk = _getSdk();
final sdk = Sdk();
final version = sdk.dartVersion;
final bucket = switch (args.hasOption('bucket')) {
true => args.getOption('bucket'),
Expand Down Expand Up @@ -85,7 +82,7 @@ void buildProjectTemplates() async {
await templatesDirectory.delete(recursive: true);
}

final sdk = _getSdk();
final sdk = Sdk();
final projectCreator = ProjectCreator(
sdk,
templatesPath,
Expand All @@ -103,7 +100,7 @@ void buildProjectTemplates() async {
@Task('build the sdk compilation artifacts for upload to google storage')
@Depends(updatePubDependencies)
void buildStorageArtifacts() async {
final sdk = _getSdk();
final sdk = Sdk();
delete(getDir('artifacts'));
final instructions = <String>[];

Expand Down Expand Up @@ -303,7 +300,7 @@ Future<void> _run(
@Task('Update pubspec dependency versions')
@Depends(buildProjectTemplates)
void updatePubDependencies() async {
final sdk = _getSdk();
final sdk = Sdk();
await _updateDependenciesFile(
flutterToolPath: sdk.flutterToolPath, channel: sdk.channel, sdk: sdk);
}
Expand Down

0 comments on commit c64f4d9

Please sign in to comment.