build.dart 1.53 KB
Newer Older
1
// Copyright 2016 The Chromium Authors. All rights reserved.
2 3 4 5 6
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';

7 8 9 10
import '../commands/build_linux.dart';
import '../commands/build_macos.dart';
import '../commands/build_windows.dart';

11
import '../runner/flutter_command.dart';
12
import 'build_aar.dart';
13
import 'build_aot.dart';
14
import 'build_apk.dart';
15
import 'build_appbundle.dart';
16
import 'build_bundle.dart';
17
import 'build_fuchsia.dart';
18
import 'build_ios.dart';
19
import 'build_web.dart';
20

21
class BuildCommand extends FlutterCommand {
22
  BuildCommand({bool verboseHelp = false}) {
23
    addSubcommand(BuildAarCommand(verboseHelp: verboseHelp));
24
    addSubcommand(BuildApkCommand(verboseHelp: verboseHelp));
25
    addSubcommand(BuildAppBundleCommand(verboseHelp: verboseHelp));
26
    addSubcommand(BuildAotCommand(verboseHelp: verboseHelp));
27 28
    addSubcommand(BuildIOSCommand());
    addSubcommand(BuildBundleCommand(verboseHelp: verboseHelp));
29
    addSubcommand(BuildWebCommand());
30
    addSubcommand(BuildMacosCommand(verboseHelp: verboseHelp));
31 32
    addSubcommand(BuildLinuxCommand());
    addSubcommand(BuildWindowsCommand());
33
    addSubcommand(BuildFuchsiaCommand(verboseHelp: verboseHelp));
34 35
  }

36
  @override
37
  final String name = 'build';
38 39

  @override
40
  final String description = 'Flutter build commands.';
41

42
  @override
43
  Future<FlutterCommandResult> runCommand() async => null;
44
}
45

46
abstract class BuildSubCommand extends FlutterCommand {
47 48
  BuildSubCommand() {
    requiresPubspecYaml();
49
  }
50
}