Display used artifact versions


(detlef.brendle) #1

Consider I have specified a dependency to an artifact like this:

dependencies {
        classpath group: 'org.gradle', name: 'customPlugin', version: '1.+'
    }

For documentation I would like to show which version of the plugin is used during execution phase.

How would that be possible ?

Thanks, detlef


(Peter Niederwieser) #2

You should be able to code a solution based on ‘configurations.classpath.resolvedConfiguration.resolvedArtifacts’ or ‘configurations.classpath.incoming.afterResolve {}’. Have a look at the Javadoc for ‘org.gradle.api.artifacts.Configuration’.