Skip to content

Commit

Permalink
oss-license-plugin: Sort dependencies loaded for LicensesTask
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarthelery committed May 20, 2023
1 parent 1e7b29b commit 0ae426b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction
import org.slf4j.LoggerFactory

import java.util.stream.Collectors
import java.util.zip.ZipEntry
import java.util.zip.ZipFile

Expand Down Expand Up @@ -114,7 +115,9 @@ abstract class LicensesTask extends DefaultTask {
ArtifactInfo artifactInfo = artifactInfoFromEntry(entry)
artifactInfoSet.add(artifactInfo)
}
artifactInfoSet.toList().asImmutable()
artifactInfoSet.stream()
.sorted(Comparator.comparing { it.toString() })
.collect(Collectors.toUnmodifiableList())
}

private void addDebugLicense() {
Expand Down

0 comments on commit 0ae426b

Please sign in to comment.