Retrieving version from ResolvedArtifact needs simplification?

(Marcel Overdijk) #1

I need to retrieve the version from a ResolvedArtifact and this seems to be the only possible way:

Note that


is a lot cleaner but getResolvedDependency() in DefaultResolvedArtifact will be deprecated in Gradle 2.0

public ResolvedDependency getResolvedDependency() {
                "For version info use ResolvedArtifact.getModuleVersion(), to access the dependency graph use ResolvedConfiguration.getFirstLevelModuleDependencies()"
        return resolvedDependency;