diff --git a/src/main/groovy/com/jaredsburrows/license/LicenseReportTask.groovy b/src/main/groovy/com/jaredsburrows/license/LicenseReportTask.groovy index aeb9d1b2..8fe1b607 100644 --- a/src/main/groovy/com/jaredsburrows/license/LicenseReportTask.groovy +++ b/src/main/groovy/com/jaredsburrows/license/LicenseReportTask.groovy @@ -111,7 +111,7 @@ class LicenseReportTask extends LicenseReportTaskKt { String year = pomText.inceptionYear?.text() // Clean up and format - name = name?.capitalize() + name = name?.trim() version = version?.trim() description = description?.trim() url = url?.trim() @@ -139,7 +139,7 @@ class LicenseReportTask extends LicenseReportTaskKt { } // Sort POM information by name - projects.sort { project -> project.getName() } + projects.sort { left, right -> left.getName().compareToIgnoreCase(right.getName()) } } @Override protected String getName(Node pomText) { diff --git a/src/main/groovy/com/jaredsburrows/license/internal/report/HtmlReport.groovy b/src/main/groovy/com/jaredsburrows/license/internal/report/HtmlReport.groovy index 8eaa4df1..4dc6871b 100644 --- a/src/main/groovy/com/jaredsburrows/license/internal/report/HtmlReport.groovy +++ b/src/main/groovy/com/jaredsburrows/license/internal/report/HtmlReport.groovy @@ -56,9 +56,8 @@ final class HtmlReport extends HtmlReportKt { h3(NOTICE_LIBRARIES) ul { for (Map.Entry> entry : projectsMap.entrySet()) { - List sortedProjects = entry.getValue().sort { - left, right -> left.getName() <=> right.getName() - } + List sortedProjects = entry.getValue(). + sort { left, right -> left.getName().compareToIgnoreCase(right.getName()) } Project currentProject = null Integer currentLicense = null diff --git a/src/test/groovy/com/jaredsburrows/license/LicensePluginAndroidSpec.groovy b/src/test/groovy/com/jaredsburrows/license/LicensePluginAndroidSpec.groovy index fa5c6419..ca63d4fc 100644 --- a/src/test/groovy/com/jaredsburrows/license/LicensePluginAndroidSpec.groovy +++ b/src/test/groovy/com/jaredsburrows/license/LicensePluginAndroidSpec.groovy @@ -219,10 +219,10 @@ final class LicensePluginAndroidSpec extends Specification {

Notice for packages: