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.
master
Rob Winch 12 years ago
parent 8d927dffb3
commit ac88106676
  1. 5
      gradle/publish-maven.gradle

@ -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

Loading…
Cancel
Save