Sort maven dependencies in generated pom files
Previously the maven dependencies were specified in an arbitrary order which made comparing the poms against other versions difficult. This commit sorts the dependencies by scope, group id, and then artifact id.
This commit is contained in:
@@ -13,6 +13,11 @@ def customizePom(pom, gradleProject) {
|
||||
dep.scope == "test"
|
||||
}
|
||||
|
||||
// sort to make pom dependencies order consistent to ease comparison of older poms
|
||||
generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
|
||||
"$dep.scope:$dep.groupId:$dep.artifactId"
|
||||
}
|
||||
|
||||
// add all items necessary for maven central publication
|
||||
generatedPom.project {
|
||||
name = gradleProject.description
|
||||
|
||||
Reference in New Issue
Block a user