build.dart 1.13 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
import '../runner/flutter_command.dart';
8
import 'build_aot.dart';
9
import 'build_apk.dart';
10
import 'build_appbundle.dart';
11
import 'build_bundle.dart';
12
import 'build_flx.dart';
13
import 'build_ios.dart';
14
import 'build_web.dart';
15

16
class BuildCommand extends FlutterCommand {
17
  BuildCommand({bool verboseHelp = false}) {
18
    addSubcommand(BuildApkCommand(verboseHelp: verboseHelp));
19
    addSubcommand(BuildAppBundleCommand(verboseHelp: verboseHelp));
20 21 22 23
    addSubcommand(BuildAotCommand());
    addSubcommand(BuildIOSCommand());
    addSubcommand(BuildFlxCommand());
    addSubcommand(BuildBundleCommand(verboseHelp: verboseHelp));
24
    addSubcommand(BuildWebCommand());
25 26
  }

27
  @override
28
  final String name = 'build';
29 30

  @override
31
  final String description = 'Flutter build commands.';
32

33
  @override
34
  Future<FlutterCommandResult> runCommand() async => null;
35
}
36

37
abstract class BuildSubCommand extends FlutterCommand {
38 39
  BuildSubCommand() {
    requiresPubspecYaml();
40
  }
41
}