Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[flutter_plugin_tools] Overhaul drive-examples #4099

Merged
Merged
3 changes: 0 additions & 3 deletions script/tool/lib/src/build_examples_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'dart:async';

import 'package:file/file.dart';
import 'package:path/path.dart' as p;
import 'package:platform/platform.dart';

import 'common/core.dart';
import 'common/package_looping_command.dart';
Expand Down Expand Up @@ -151,8 +150,6 @@ class BuildExamplesCommand extends PackageLoopingCommand {
String flutterBuildType, {
List<String> extraBuildFlags = const <String>[],
}) async {
final String flutterCommand =
const LocalPlatform().isWindows ? 'flutter.bat' : 'flutter';
final String enableExperiment = getStringArg(kEnableExperiment);

final int exitCode = await processRunner.runAndStream(
Expand Down
5 changes: 5 additions & 0 deletions script/tool/lib/src/common/plugin_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:args/command_runner.dart';
import 'package:file/file.dart';
import 'package:git/git.dart';
import 'package:path/path.dart' as p;
import 'package:platform/platform.dart';

import 'core.dart';
import 'git_version_finder.dart';
Expand Down Expand Up @@ -85,6 +86,10 @@ abstract class PluginCommand extends Command<void> {
int? _shardIndex;
int? _shardCount;

/// The command to use when running `flutter`.
String get flutterCommand =>
const LocalPlatform().isWindows ? 'flutter.bat' : 'flutter';

/// The shard of the overall command execution that this instance should run.
int get shardIndex {
if (_shardIndex == null) {
Expand Down
Loading