未验证 提交 7d17da76 编写于 作者: J Jason Simmons 提交者: GitHub

Package Skia licenses into a separate file from other third party libraries (#5861)

Fixes https://github.com/flutter/flutter/issues/19776
上级 d2d8bf39
......@@ -910,8 +910,17 @@ class RepositoryDirectory extends RepositoryEntry implements LicenseSource {
}
}
}
for (RepositoryDirectory child in virtualSubdirectories) {
_subdirectories.add(child);
_childrenByName[child.name] = child;
}
}
// Override this to add additional child directories that do not represent a
// direct child of this directory's filesystem node.
List<RepositoryDirectory> get virtualSubdirectories => <RepositoryDirectory>[];
bool shouldRecurse(fs.IoNode entry) {
return entry.name != '.cipd' &&
entry.name != '.git' &&
......@@ -1913,6 +1922,7 @@ class RepositoryRootThirdPartyDirectory extends RepositoryGenericThirdPartyDirec
&& entry.name != 'instrumented_libraries' // unused according to chinmay
&& entry.name != 'android_tools' // excluded on advice
&& entry.name != 'googletest' // only used by tests
&& entry.name != 'skia' // treated as a separate component
&& super.shouldRecurse(entry);
}
......@@ -1946,8 +1956,6 @@ class RepositoryRootThirdPartyDirectory extends RepositoryGenericThirdPartyDirec
return new RepositoryLibWebpDirectory(this, entry);
if (entry.name == 'pkg')
return new RepositoryPkgDirectory(this, entry);
if (entry.name == 'skia')
return new RepositorySkiaDirectory(this, entry);
if (entry.name == 'vulkan')
return new RepositoryVulkanDirectory(this, entry);
return super.createSubdirectory(entry);
......@@ -2392,6 +2400,15 @@ class RepositoryRoot extends RepositoryDirectory {
return new RepositoryTopazDirectory(this, entry);
return super.createSubdirectory(entry);
}
@override
List<RepositoryDirectory> get virtualSubdirectories {
// Skia is updated more frequently than other third party libraries and
// is therefore represented as a separate top-level component.
fs.Directory thirdPartyNode = io.walk.firstWhere((fs.IoNode node) => node.name == 'third_party');
fs.IoNode skiaNode = thirdPartyNode.walk.firstWhere((fs.IoNode node) => node.name == 'skia');
return <RepositoryDirectory>[new RepositorySkiaDirectory(this, skiaNode)];
}
}
......
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册