Permalink
Browse files

optimisation to populateDependencies

  • Loading branch information...
1 parent 4505ed8 commit 7c612103359c7eb88c30a9811dd75aa342e317bf @alkemist alkemist committed Mar 27, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 gradle/assemble.gradle
@@ -53,8 +53,11 @@ task configurePopulateDependencies << {
filestore = "$cacheDir/filestore"
}
+ def seen = []
libsConfigurations.each { configuration ->
- configuration.resolvedConfiguration.resolvedArtifacts.each { artifact ->
+ for (artifact in configuration.resolvedConfiguration.resolvedArtifacts) {
+ if (artifact in seen) continue
+ seen << artifact
def dependency = artifact.moduleVersion.id
if (!projectNames.contains(dependency.name)) {
populateDependencies.into("$dependency.group/$dependency.name/$dependency.version/jars") {
@@ -63,7 +66,7 @@ task configurePopulateDependencies << {
populateDependencies.from ("${metadata}/${dependency.group}/${dependency.name}/${dependency.version}") {
include "*.ivy.xml"
- eachFile { it.path = "$dependency.group/$dependency.name/$dependency.version/ivy-${dependency.version}.xml" }
+ eachFile { it.path = "$dependency.group/$dependency.name/$dependency.version}/ivy-${dependency.version}.xml" }
}
}
}

0 comments on commit 7c61210

Please sign in to comment.