Skip to content

Commit

Permalink
Fix dependencies (resolve versions via global dependency management)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermocalvo committed Oct 24, 2023
1 parent b6e0659 commit 9d43a43
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,14 @@ BINTRAY_KEY=key

}

// simply remove dependencies without a version
// version-less dependencies are handled with dependencyManagement
// fix dependencies without a version
// resolve versions via global dependency management
// see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions
final versions = project.dependencyManagement.dependencyManagementContainer.globalDependencyManagement.versions
pomNode.dependencies.dependency.findAll {
it.version.text().isEmpty()
}.each {
it.replaceNode {}
it.appendNode('version', versions["${it.groupId.text()}:${it.artifactId.text()}"])
}
}
}
Expand Down

0 comments on commit 9d43a43

Please sign in to comment.