Commit 3bc3d4a5 authored by xster's avatar xster Committed by GitHub

Remove various roboto font logic (#8350)

parent 41edc1ac
...@@ -329,7 +329,6 @@ class FlutterTask extends DefaultTask { ...@@ -329,7 +329,6 @@ class FlutterTask extends DefaultTask {
args "--kernel", kernelFile.absolutePath args "--kernel", kernelFile.absolutePath
} }
args "--output-file", "${intermediateDir}/app.flx" args "--output-file", "${intermediateDir}/app.flx"
args "--no-include-roboto-fonts"
if (buildMode != "debug") { if (buildMode != "debug") {
args "--precompiled" args "--precompiled"
} else { } else {
......
...@@ -23,7 +23,6 @@ class AssetBundle { ...@@ -23,7 +23,6 @@ class AssetBundle {
static const String _kAssetManifestJson = 'AssetManifest.json'; static const String _kAssetManifestJson = 'AssetManifest.json';
static const String _kFontManifestJson = 'FontManifest.json'; static const String _kFontManifestJson = 'FontManifest.json';
static const String _kFontSetMaterial = 'material'; static const String _kFontSetMaterial = 'material';
static const String _kFontSetRoboto = 'roboto';
static const String _kLICENSE = 'LICENSE'; static const String _kLICENSE = 'LICENSE';
bool _fixed = false; bool _fixed = false;
...@@ -69,7 +68,6 @@ class AssetBundle { ...@@ -69,7 +68,6 @@ class AssetBundle {
String workingDirPath, String workingDirPath,
String packagesPath, String packagesPath,
bool includeDefaultFonts: true, bool includeDefaultFonts: true,
bool includeRobotoFonts: true,
bool reportLicensedPackages: false bool reportLicensedPackages: false
}) async { }) async {
workingDirPath ??= getAssetBuildDirectory(); workingDirPath ??= getAssetBuildDirectory();
...@@ -126,8 +124,6 @@ class AssetBundle { ...@@ -126,8 +124,6 @@ class AssetBundle {
final List<_Asset> materialAssets = <_Asset>[]; final List<_Asset> materialAssets = <_Asset>[];
if (usesMaterialDesign && includeDefaultFonts) { if (usesMaterialDesign && includeDefaultFonts) {
materialAssets.addAll(_getMaterialAssets(_kFontSetMaterial)); materialAssets.addAll(_getMaterialAssets(_kFontSetMaterial));
if (includeRobotoFonts)
materialAssets.addAll(_getMaterialAssets(_kFontSetRoboto));
} }
for (_Asset asset in materialAssets) { for (_Asset asset in materialAssets) {
assert(asset.assetFileExists); assert(asset.assetFileExists);
...@@ -137,7 +133,7 @@ class AssetBundle { ...@@ -137,7 +133,7 @@ class AssetBundle {
entries[_kAssetManifestJson] = _createAssetManifest(assetVariants); entries[_kAssetManifestJson] = _createAssetManifest(assetVariants);
final DevFSContent fontManifest = final DevFSContent fontManifest =
_createFontManifest(manifestDescriptor, usesMaterialDesign, includeDefaultFonts, includeRobotoFonts); _createFontManifest(manifestDescriptor, usesMaterialDesign, includeDefaultFonts);
if (fontManifest != null) if (fontManifest != null)
entries[_kFontManifestJson] = fontManifest; entries[_kFontManifestJson] = fontManifest;
...@@ -305,13 +301,10 @@ DevFSContent _createAssetManifest(Map<_Asset, List<_Asset>> assetVariants) { ...@@ -305,13 +301,10 @@ DevFSContent _createAssetManifest(Map<_Asset, List<_Asset>> assetVariants) {
DevFSContent _createFontManifest(Map<String, dynamic> manifestDescriptor, DevFSContent _createFontManifest(Map<String, dynamic> manifestDescriptor,
bool usesMaterialDesign, bool usesMaterialDesign,
bool includeDefaultFonts, bool includeDefaultFonts) {
bool includeRobotoFonts) {
final List<Map<String, dynamic>> fonts = <Map<String, dynamic>>[]; final List<Map<String, dynamic>> fonts = <Map<String, dynamic>>[];
if (usesMaterialDesign && includeDefaultFonts) { if (usesMaterialDesign && includeDefaultFonts) {
fonts.addAll(_getMaterialFonts(AssetBundle._kFontSetMaterial)); fonts.addAll(_getMaterialFonts(AssetBundle._kFontSetMaterial));
if (includeRobotoFonts)
fonts.addAll(_getMaterialFonts(AssetBundle._kFontSetRoboto));
} }
if (manifestDescriptor != null && manifestDescriptor.containsKey('fonts')) if (manifestDescriptor != null && manifestDescriptor.containsKey('fonts'))
fonts.addAll(manifestDescriptor['fonts']); fonts.addAll(manifestDescriptor['fonts']);
......
...@@ -22,7 +22,6 @@ class BuildFlxCommand extends BuildSubCommand { ...@@ -22,7 +22,6 @@ class BuildFlxCommand extends BuildSubCommand {
argParser.addOption('depfile', defaultsTo: defaultDepfilePath); argParser.addOption('depfile', defaultsTo: defaultDepfilePath);
argParser.addOption('kernel'); argParser.addOption('kernel');
argParser.addOption('working-dir', defaultsTo: getAssetBuildDirectory()); argParser.addOption('working-dir', defaultsTo: getAssetBuildDirectory());
argParser.addFlag('include-roboto-fonts', defaultsTo: true);
argParser.addFlag('report-licensed-packages', help: 'Whether to report the names of all the packages that are included in the application\'s LICENSE file.', defaultsTo: false); argParser.addFlag('report-licensed-packages', help: 'Whether to report the names of all the packages that are included in the application\'s LICENSE file.', defaultsTo: false);
usesPubOption(); usesPubOption();
} }
...@@ -52,7 +51,6 @@ class BuildFlxCommand extends BuildSubCommand { ...@@ -52,7 +51,6 @@ class BuildFlxCommand extends BuildSubCommand {
workingDirPath: argResults['working-dir'], workingDirPath: argResults['working-dir'],
kernelPath: argResults['kernel'], kernelPath: argResults['kernel'],
precompiledSnapshot: argResults['precompiled'], precompiledSnapshot: argResults['precompiled'],
includeRobotoFonts: argResults['include-roboto-fonts'],
reportLicensedPackages: argResults['report-licensed-packages'] reportLicensedPackages: argResults['report-licensed-packages']
); );
} }
......
...@@ -66,7 +66,6 @@ Future<Null> build({ ...@@ -66,7 +66,6 @@ Future<Null> build({
String packagesPath, String packagesPath,
String kernelPath, String kernelPath,
bool precompiledSnapshot: false, bool precompiledSnapshot: false,
bool includeRobotoFonts: true,
bool reportLicensedPackages: false bool reportLicensedPackages: false
}) async { }) async {
outputPath ??= defaultFlxOutputPath; outputPath ??= defaultFlxOutputPath;
...@@ -105,7 +104,6 @@ Future<Null> build({ ...@@ -105,7 +104,6 @@ Future<Null> build({
privateKeyPath: privateKeyPath, privateKeyPath: privateKeyPath,
workingDirPath: workingDirPath, workingDirPath: workingDirPath,
packagesPath: packagesPath, packagesPath: packagesPath,
includeRobotoFonts: includeRobotoFonts,
reportLicensedPackages: reportLicensedPackages reportLicensedPackages: reportLicensedPackages
).then((_) => null); ).then((_) => null);
} }
...@@ -119,7 +117,6 @@ Future<List<String>> assemble({ ...@@ -119,7 +117,6 @@ Future<List<String>> assemble({
String workingDirPath, String workingDirPath,
String packagesPath, String packagesPath,
bool includeDefaultFonts: true, bool includeDefaultFonts: true,
bool includeRobotoFonts: true,
bool reportLicensedPackages: false bool reportLicensedPackages: false
}) async { }) async {
outputPath ??= defaultFlxOutputPath; outputPath ??= defaultFlxOutputPath;
...@@ -134,7 +131,6 @@ Future<List<String>> assemble({ ...@@ -134,7 +131,6 @@ Future<List<String>> assemble({
workingDirPath: workingDirPath, workingDirPath: workingDirPath,
packagesPath: packagesPath, packagesPath: packagesPath,
includeDefaultFonts: includeDefaultFonts, includeDefaultFonts: includeDefaultFonts,
includeRobotoFonts: includeRobotoFonts,
reportLicensedPackages: reportLicensedPackages reportLicensedPackages: reportLicensedPackages
); );
if (result != 0) if (result != 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment