diff --git a/README.md b/README.md index 157046bf..2a11731a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ buildscript { } dependencies { - classpath 'com.github.ben-manes:gradle-versions-plugin:0.11' + classpath 'com.github.ben-manes:gradle-versions-plugin:0.11.1' // classpath 'org.codehaus.groovy:groovy-backports-compat23:2.3.5' // uncomment if you're using Gradle 1.x } } diff --git a/build.gradle b/build.gradle index eddc255a..6f7663a3 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'nexus' apply plugin: 'codenarc' group = 'com.github.ben-manes' -version = '0.12-SNAPSHOT' +version = '0.11.1' sourceCompatibility = '1.6' diff --git a/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy b/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy index 91b46c09..dc1ade8d 100644 --- a/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy +++ b/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy @@ -22,6 +22,7 @@ import org.gradle.api.artifacts.ComponentSelection import org.gradle.api.artifacts.ComponentSelectionRules import org.gradle.api.artifacts.Configuration import org.gradle.api.artifacts.Dependency +import org.gradle.api.artifacts.ExternalDependency import org.gradle.api.artifacts.LenientConfiguration import org.gradle.api.artifacts.ResolutionStrategy import org.gradle.api.artifacts.ResolvedDependency @@ -83,10 +84,13 @@ class Resolver { /** Returns a copy of the configuration where dependencies will be resolved up to the revision. */ private Configuration createLatestConfiguration(Configuration configuration, String revision) { - List latest = configuration.dependencies.collect { depenency -> - String version = (depenency.version == null) ? 'none' : '+' - project.dependencies.create("${depenency.group}:${depenency.name}:${version}") + List latest = configuration.dependencies.findAll { dependency -> + dependency instanceof ExternalDependency + }.collect { dependency -> + String version = (dependency.version == null) ? 'none' : '+' + project.dependencies.create("${dependency.group}:${dependency.name}:${version}") } + Configuration copy = configuration.copyRecursive().setTransitive(false) copy.dependencies.clear() copy.dependencies.addAll(latest)