Closed monae closed 9 months ago
On generating HTML report, the method sortedWith of list is called but its return value is discarded. Maybe this is a confusion with the non-const method sortWith. https://github.com/jaredsburrows/gradle-license-plugin/blob/0.9.4/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt#L59
sortedWith
sortWith
As a result, two projects with the same combination of licenses but in different order will not be grouped together.
<!-- .pom 1 --> <licenses> <license> <name>Some license 1</name> <url>http://website-1.tld/</url> <distribution>repo</distribution> </license> <license> <name>Some license 2</name> <url>http://website-2.tld/</url> <distribution>repo</distribution> </license> </licenses>
<!-- .pom 2 --> <licenses> <license> <name>Some license 2</name> <url>http://website-2.tld/</url> <distribution>repo</distribution> </license> <license> <name>Some license 1</name> <url>http://website-1.tld/</url> <distribution>repo</distribution> </license> </licenses>
Is it a bug? If so, I think the order of licenses on the report also needs to be sorted in some fixed way. https://github.com/jaredsburrows/gradle-license-plugin/blob/0.9.4/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt#L140
Good idea. Feel free to submit a PR for this!
On generating HTML report, the method
sortedWith
of list is called but its return value is discarded. Maybe this is a confusion with the non-const methodsortWith
. https://github.com/jaredsburrows/gradle-license-plugin/blob/0.9.4/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt#L59As a result, two projects with the same combination of licenses but in different order will not be grouped together.
Is it a bug? If so, I think the order of licenses on the report also needs to be sorted in some fixed way. https://github.com/jaredsburrows/gradle-license-plugin/blob/0.9.4/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt#L140