De-dup FILE output for each license (flutter/engine#10945)

Only list each file once per license block.
This commit is contained in:
stuartmorgan
2019-08-21 10:12:41 -07:00
committed by GitHub
parent 0d41194301
commit 2c1bf6a61f
2 changed files with 4 additions and 4 deletions

View File

@@ -1,2 +1,2 @@
Signature: e446a6af93ba7d07fcb4170016dd6bd1
Signature: 6094aeb823d406e3a1a7f3141a7fb188

View File

@@ -395,8 +395,7 @@ abstract class License implements Comparable<License> {
final String origin;
final LicenseType type;
Iterable<String> get licensees => _licensees;
final List<String> _licensees = <String>[];
final Set<String> _licensees = <String>{};
final Set<String> _libraries = <String>{};
bool get isUsed => _licensees.isNotEmpty;
@@ -419,7 +418,8 @@ abstract class License implements Comparable<License> {
String toString() {
final List<String> prefixes = _libraries.toList();
prefixes.sort();
_licensees.sort();
final List<String> licensees = _licensees.toList();
licensees.sort();
final List<String> header = <String>[];
header.addAll(prefixes.map((String s) => 'LIBRARY: $s'));
header.add('ORIGIN: $origin');