mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #1641 from tvolkert/master
Create flutter_tools.dart to represent public tools API
This commit is contained in:
commit
1d3ce8e8c4
31
packages/flutter_tools/lib/flutter_tools.dart
Normal file
31
packages/flutter_tools/lib/flutter_tools.dart
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
library flutter_tools;
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:archive/archive.dart';
|
||||
|
||||
import 'src/flx.dart' as flx;
|
||||
|
||||
/// Assembles a Flutter .flx file from a pre-existing manifest descriptor
|
||||
/// and a pre-compiled snapshot.
|
||||
Future<int> assembleFlx({
|
||||
Map manifestDescriptor: const {},
|
||||
ArchiveFile snapshotFile: null,
|
||||
String assetBasePath: flx.defaultAssetBasePath,
|
||||
String materialAssetBasePath: flx.defaultMaterialAssetBasePath,
|
||||
String outputPath: flx.defaultFlxOutputPath,
|
||||
String privateKeyPath: flx.defaultPrivateKeyPath
|
||||
}) async {
|
||||
return flx.assemble(
|
||||
manifestDescriptor: manifestDescriptor,
|
||||
snapshotFile: snapshotFile,
|
||||
assetBasePath: assetBasePath,
|
||||
materialAssetBasePath: materialAssetBasePath,
|
||||
outputPath: outputPath,
|
||||
privateKeyPath: privateKeyPath
|
||||
);
|
||||
}
|
||||
@ -243,11 +243,6 @@ Future<int> build(
|
||||
);
|
||||
}
|
||||
|
||||
/// Assembles a Flutter .flx file from a pre-existing manifest descriptor
|
||||
/// and a pre-compiled snapshot.
|
||||
///
|
||||
/// This may be called by external build toolchains, so practice caution
|
||||
/// when changing this method signature (alert flutter-dev).
|
||||
Future<int> assemble({
|
||||
Map manifestDescriptor: const {},
|
||||
ArchiveFile snapshotFile: null,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user