Skip to content

Commit

Permalink
modify to distinct license
Browse files Browse the repository at this point in the history
  • Loading branch information
MeilCli committed Jun 24, 2020
1 parent dd5ec2a commit c8b2ca9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ class LibrariesToNoticeTranslator : ITranslator<List<Library>, Notice> {
resources = listOf(
NoticeResource(
artifacts = source.map { it.artifact }.distinct().sortedBy { it },
licenses = source.map { it.licenses }.firstOrNull() ?: listOf(License(Placeholder.licenseName, Placeholder.licenseUrl))
licenses = source.map { it.licenses }.firstOrNull()?.distinct() ?: listOf(
License(
Placeholder.licenseName,
Placeholder.licenseUrl
)
)
)
)
)
Expand Down

0 comments on commit c8b2ca9

Please sign in to comment.