Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f307735e
Commit
f307735e
authored
Jun 21, 2016
by
Jason Simmons
Committed by
GitHub
Jun 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the assembleFlx accessor and FLX asset path overrides (#4671)
This is now obsolete
parent
b81229b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
44 deletions
+3
-44
flutter_tools.dart
packages/flutter_tools/lib/flutter_tools.dart
+0
-28
flx.dart
packages/flutter_tools/lib/src/flx.dart
+3
-16
No files found.
packages/flutter_tools/lib/flutter_tools.dart
deleted
100644 → 0
View file @
b81229b5
// 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.
import
'dart:async'
;
import
'dart:io'
;
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
<
String
,
dynamic
>
manifestDescriptor:
const
<
String
,
dynamic
>{},
File
snapshotFile:
null
,
String
assetBasePath:
flx
.
defaultAssetBasePath
,
Map
<
String
,
String
>
assetPathOverrides:
const
<
String
,
String
>{},
String
outputPath:
flx
.
defaultFlxOutputPath
,
String
privateKeyPath:
flx
.
defaultPrivateKeyPath
})
async
{
return
flx
.
assemble
(
manifestDescriptor:
manifestDescriptor
,
snapshotFile:
snapshotFile
,
assetBasePath:
assetBasePath
,
assetPathOverrides:
assetPathOverrides
,
outputPath:
outputPath
,
privateKeyPath:
privateKeyPath
);
}
packages/flutter_tools/lib/src/flx.dart
View file @
f307735e
...
...
@@ -127,8 +127,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
Map
<
_Asset
,
List
<
_Asset
>>
_parseAssets
(
PackageMap
packageMap
,
Map
<
String
,
dynamic
>
manifestDescriptor
,
String
assetBase
,
Map
<
String
,
String
>
assetPathOverrides
,
{
String
assetBase
,
{
List
<
String
>
excludeDirs:
const
<
String
>[]
})
{
Map
<
_Asset
,
List
<
_Asset
>>
result
=
<
_Asset
,
List
<
_Asset
>>{};
...
...
@@ -141,7 +140,7 @@ Map<_Asset, List<_Asset>> _parseAssets(
if
(
manifestDescriptor
.
containsKey
(
'assets'
))
{
for
(
String
asset
in
manifestDescriptor
[
'assets'
])
{
_Asset
baseAsset
=
_resolveAsset
(
packageMap
,
assetBase
,
asset
PathOverrides
,
asset
);
_Asset
baseAsset
=
_resolveAsset
(
packageMap
,
assetBase
,
asset
);
if
(!
baseAsset
.
assetFileExists
)
{
printError
(
'Error: unable to locate asset entry in flutter.yaml: "
$asset
".'
);
...
...
@@ -187,7 +186,7 @@ Map<_Asset, List<_Asset>> _parseAssets(
String
asset
=
font
[
'asset'
];
if
(
asset
==
null
)
continue
;
_Asset
baseAsset
=
_resolveAsset
(
packageMap
,
assetBase
,
asset
PathOverrides
,
asset
);
_Asset
baseAsset
=
_resolveAsset
(
packageMap
,
assetBase
,
asset
);
if
(!
baseAsset
.
assetFileExists
)
{
printError
(
'Error: unable to locate asset entry in flutter.yaml: "
$asset
".'
);
return
null
;
...
...
@@ -204,18 +203,8 @@ Map<_Asset, List<_Asset>> _parseAssets(
_Asset
_resolveAsset
(
PackageMap
packageMap
,
String
assetBase
,
Map
<
String
,
String
>
assetPathOverrides
,
String
asset
)
{
String
overridePath
=
assetPathOverrides
[
asset
];
if
(
overridePath
!=
null
)
{
return
new
_Asset
(
base:
path
.
dirname
(
overridePath
),
source
:
path
.
basename
(
overridePath
),
relativePath:
asset
);
}
if
(
asset
.
startsWith
(
'packages/'
)
&&
!
FileSystemEntity
.
isFileSync
(
path
.
join
(
assetBase
,
asset
)))
{
// Convert packages/flutter_gallery_assets/clouds-0.png to clouds-0.png.
String
packageKey
=
asset
.
substring
(
9
);
...
...
@@ -387,7 +376,6 @@ Future<int> assemble({
Map
<
String
,
dynamic
>
manifestDescriptor:
const
<
String
,
dynamic
>{},
File
snapshotFile
,
String
assetBasePath:
defaultAssetBasePath
,
Map
<
String
,
String
>
assetPathOverrides:
const
<
String
,
String
>{},
String
outputPath:
defaultFlxOutputPath
,
String
privateKeyPath:
defaultPrivateKeyPath
,
String
workingDirPath:
defaultWorkingDirPath
,
...
...
@@ -399,7 +387,6 @@ Future<int> assemble({
new
PackageMap
(
path
.
join
(
assetBasePath
,
'.packages'
)),
manifestDescriptor
,
assetBasePath
,
assetPathOverrides
,
excludeDirs:
<
String
>[
workingDirPath
,
path
.
join
(
assetBasePath
,
'build'
)]
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment