Unverified Commit cb5b5c34 authored by Andrew Kolos's avatar Andrew Kolos Committed by GitHub

Tighten asset variant detection criteria to only include device-pixel-ratio variants (#110721)

parent 2853a601
...@@ -169,7 +169,6 @@ flutter: ...@@ -169,7 +169,6 @@ flutter:
- packages/flutter_gallery_assets/products/table.png - packages/flutter_gallery_assets/products/table.png
- packages/flutter_gallery_assets/products/teaset.png - packages/flutter_gallery_assets/products/teaset.png
- packages/flutter_gallery_assets/products/top.png - packages/flutter_gallery_assets/products/top.png
- packages/flutter_gallery_assets/people/ali.png
- packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/people/square/ali.png
- packages/flutter_gallery_assets/people/square/peter.png - packages/flutter_gallery_assets/people/square/peter.png
- packages/flutter_gallery_assets/people/square/sandra.png - packages/flutter_gallery_assets/people/square/sandra.png
......
This diff is collapsed.
...@@ -121,7 +121,6 @@ Future<AssetBundle?> buildAssets({ ...@@ -121,7 +121,6 @@ Future<AssetBundle?> buildAssets({
final AssetBundle assetBundle = AssetBundleFactory.instance.createBundle(); final AssetBundle assetBundle = AssetBundleFactory.instance.createBundle();
final int result = await assetBundle.build( final int result = await assetBundle.build(
manifestPath: manifestPath, manifestPath: manifestPath,
assetDirPath: assetDirPath,
packagesPath: packagesPath, packagesPath: packagesPath,
targetPlatform: targetPlatform, targetPlatform: targetPlatform,
); );
......
...@@ -222,11 +222,11 @@ $assetsSection ...@@ -222,11 +222,11 @@ $assetsSection
assets: <String>['a/foo'], assets: <String>['a/foo'],
); );
final List<String> assets = <String>['a/foo', 'a/v/foo']; final List<String> assets = <String>['a/foo', 'a/2x/foo'];
writeAssets('p/p/', assets); writeAssets('p/p/', assets);
const String expectedManifest = '{"packages/test_package/a/foo":' const String expectedManifest = '{"packages/test_package/a/foo":'
'["packages/test_package/a/foo","packages/test_package/a/v/foo"]}'; '["packages/test_package/a/foo","packages/test_package/a/2x/foo"]}';
await buildAndVerifyAssets( await buildAndVerifyAssets(
assets, assets,
...@@ -251,11 +251,11 @@ $assetsSection ...@@ -251,11 +251,11 @@ $assetsSection
'test_package', 'test_package',
); );
final List<String> assets = <String>['a/foo', 'a/v/foo']; final List<String> assets = <String>['a/foo', 'a/2x/foo'];
writeAssets('p/p/lib/', assets); writeAssets('p/p/lib/', assets);
const String expectedManifest = '{"packages/test_package/a/foo":' const String expectedManifest = '{"packages/test_package/a/foo":'
'["packages/test_package/a/foo","packages/test_package/a/v/foo"]}'; '["packages/test_package/a/foo","packages/test_package/a/2x/foo"]}';
await buildAndVerifyAssets( await buildAndVerifyAssets(
assets, assets,
...@@ -344,15 +344,15 @@ $assetsSection ...@@ -344,15 +344,15 @@ $assetsSection
assets: <String>['a/foo'], assets: <String>['a/foo'],
); );
final List<String> assets = <String>['a/foo', 'a/v/foo']; final List<String> assets = <String>['a/foo', 'a/2x/foo'];
writeAssets('p/p/', assets); writeAssets('p/p/', assets);
writeAssets('p2/p/', assets); writeAssets('p2/p/', assets);
const String expectedAssetManifest = const String expectedAssetManifest =
'{"packages/test_package/a/foo":' '{"packages/test_package/a/foo":'
'["packages/test_package/a/foo","packages/test_package/a/v/foo"],' '["packages/test_package/a/foo","packages/test_package/a/2x/foo"],'
'"packages/test_package2/a/foo":' '"packages/test_package2/a/foo":'
'["packages/test_package2/a/foo","packages/test_package2/a/v/foo"]}'; '["packages/test_package2/a/foo","packages/test_package2/a/2x/foo"]}';
await buildAndVerifyAssets( await buildAndVerifyAssets(
assets, assets,
...@@ -384,15 +384,15 @@ $assetsSection ...@@ -384,15 +384,15 @@ $assetsSection
'test_package2', 'test_package2',
); );
final List<String> assets = <String>['a/foo', 'a/v/foo']; final List<String> assets = <String>['a/foo', 'a/2x/foo'];
writeAssets('p/p/lib/', assets); writeAssets('p/p/lib/', assets);
writeAssets('p2/p/lib/', assets); writeAssets('p2/p/lib/', assets);
const String expectedAssetManifest = const String expectedAssetManifest =
'{"packages/test_package/a/foo":' '{"packages/test_package/a/foo":'
'["packages/test_package/a/foo","packages/test_package/a/v/foo"],' '["packages/test_package/a/foo","packages/test_package/a/2x/foo"],'
'"packages/test_package2/a/foo":' '"packages/test_package2/a/foo":'
'["packages/test_package2/a/foo","packages/test_package2/a/v/foo"]}'; '["packages/test_package2/a/foo","packages/test_package2/a/2x/foo"]}';
await buildAndVerifyAssets( await buildAndVerifyAssets(
assets, assets,
...@@ -421,12 +421,12 @@ $assetsSection ...@@ -421,12 +421,12 @@ $assetsSection
'test_package2', 'test_package2',
); );
final List<String> assets = <String>['a/foo', 'a/v/foo']; final List<String> assets = <String>['a/foo', 'a/2x/foo'];
writeAssets('p2/p/lib/', assets); writeAssets('p2/p/lib/', assets);
const String expectedAssetManifest = const String expectedAssetManifest =
'{"packages/test_package2/a/foo":' '{"packages/test_package2/a/foo":'
'["packages/test_package2/a/foo","packages/test_package2/a/v/foo"]}'; '["packages/test_package2/a/foo","packages/test_package2/a/2x/foo"]}';
await buildAndVerifyAssets( await buildAndVerifyAssets(
assets, assets,
...@@ -553,7 +553,7 @@ $assetsSection ...@@ -553,7 +553,7 @@ $assetsSection
writePubspecFile('pubspec.yaml', 'test'); writePubspecFile('pubspec.yaml', 'test');
writePackagesFile('test_package:p/p/lib/'); writePackagesFile('test_package:p/p/lib/');
final List<String> assetsOnDisk = <String>['a/foo','a/b/foo']; final List<String> assetsOnDisk = <String>['a/foo','a/2x/foo'];
final List<String> assetOnManifest = <String>['a/',]; final List<String> assetOnManifest = <String>['a/',];
writePubspecFile( writePubspecFile(
...@@ -564,7 +564,7 @@ $assetsSection ...@@ -564,7 +564,7 @@ $assetsSection
writeAssets('p/p/', assetsOnDisk); writeAssets('p/p/', assetsOnDisk);
const String expectedAssetManifest = const String expectedAssetManifest =
'{"packages/test_package/a/foo":["packages/test_package/a/foo","packages/test_package/a/b/foo"]}'; '{"packages/test_package/a/foo":["packages/test_package/a/foo","packages/test_package/a/2x/foo"]}';
await buildAndVerifyAssets( await buildAndVerifyAssets(
assetsOnDisk, assetsOnDisk,
...@@ -580,7 +580,7 @@ $assetsSection ...@@ -580,7 +580,7 @@ $assetsSection
writePubspecFile('pubspec.yaml', 'test'); writePubspecFile('pubspec.yaml', 'test');
writePackagesFile('test_package:p/p/lib/'); writePackagesFile('test_package:p/p/lib/');
final List<String> assetsOnDisk = <String>['a/foo', 'a/b/foo']; final List<String> assetsOnDisk = <String>['a/foo', 'a/2x/foo'];
final List<String> assetOnManifest = <String>[]; final List<String> assetOnManifest = <String>[];
writePubspecFile( writePubspecFile(
......
...@@ -643,7 +643,7 @@ name: example ...@@ -643,7 +643,7 @@ name: example
flutter: flutter:
assets: assets:
- foo.txt - assets/foo.txt
'''); ''');
globals.fs.file('assets/foo.txt').createSync(recursive: true); globals.fs.file('assets/foo.txt').createSync(recursive: true);
......
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