From 60b6b79319faff4f9d2efe3727b3acb73eb11115 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Fri, 5 Feb 2016 14:20:20 -0800 Subject: [PATCH] Create flutter_tools.dart to represent public tools API --- packages/flutter_tools/lib/flutter_tools.dart | 31 +++++++++++++++++++ packages/flutter_tools/lib/src/flx.dart | 5 --- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 packages/flutter_tools/lib/flutter_tools.dart diff --git a/packages/flutter_tools/lib/flutter_tools.dart b/packages/flutter_tools/lib/flutter_tools.dart new file mode 100644 index 00000000000..dfebdf482d6 --- /dev/null +++ b/packages/flutter_tools/lib/flutter_tools.dart @@ -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 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 + ); +} diff --git a/packages/flutter_tools/lib/src/flx.dart b/packages/flutter_tools/lib/src/flx.dart index b93118947f2..8ddb562b6da 100644 --- a/packages/flutter_tools/lib/src/flx.dart +++ b/packages/flutter_tools/lib/src/flx.dart @@ -243,11 +243,6 @@ Future 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 assemble({ Map manifestDescriptor: const {}, ArchiveFile snapshotFile: null,