Fix flavor-conditional asset bundling for path dependencies (#156687)
Fixes https://github.com/flutter/flutter/issues/155755 When building the asset bundle during, the `--flavor` option isn't considered when searching for assets from dependencies. This PR fixes that. It's possible that when initially implementing this feature, I thought that flavor-conditional assets didn't make sense for packages. While I still think that way regarding pub packages, using this feature makes a lot more sense for monorepo projects. <details> <summary> Pre-launch checklist </summary> </details>
This commit is contained in:
@@ -380,6 +380,7 @@ class ManifestAssetBundle implements AssetBundle {
|
||||
targetPlatform,
|
||||
packageName: package.name,
|
||||
attributedPackage: package,
|
||||
flavor: flavor,
|
||||
);
|
||||
|
||||
if (packageAssets == null) {
|
||||
@@ -873,7 +874,7 @@ class ManifestAssetBundle implements AssetBundle {
|
||||
TargetPlatform? targetPlatform, {
|
||||
String? packageName,
|
||||
Package? attributedPackage,
|
||||
String? flavor,
|
||||
required String? flavor,
|
||||
}) {
|
||||
final Map<_Asset, List<_Asset>> result = <_Asset, List<_Asset>>{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user