In Gradle, how can I generate a POM file with dynamic dependencies resolved to the actual version used?
dependencies {
testCompile(group: \'junit\', name
It will require some effort to code this up. The two main parts are:
Configuration#getIncoming
or Configuration#getResolvedConfiguration
APIXMlParser
API (assuming the new maven-publish
plugin is used)Information about the Configuration
API can be found in the Gradle Build Language Reference, which further links into the Javadoc.
The full Gradle distribution contains a tiny sample that demonstrates POM manipulation. Information about XmlParser
can be found in the Groovy docs.