diff init.gradle @ 114:9ed6a36104ed

Improve dependency resolution performance: use gradle resolver instead of ivy and use new repo which does not cnotain snapshots
author smith@nwoca.org
date Fri, 26 Oct 2012 21:32:27 +0100
parents 029db4d977fe
children 8ddd1a6fa4ea
line wrap: on
line diff
--- a/init.gradle	Wed Oct 24 14:56:33 2012 +0100
+++ b/init.gradle	Fri Oct 26 21:32:27 2012 +0100
@@ -6,6 +6,7 @@
 
 loadEnvironments()
 
+
 gradle.addListener(new ArtifactoryGradleSettings())
 
 gradle.ext.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')}
@@ -43,12 +44,14 @@
     
 }
 
+
 class ArtifactoryGradleSettings extends BuildAdapter implements BuildListener {
     
     def void projectsEvaluated(Gradle gradle) {
         def ssdtArtifactory = 'http://repos.ssdt.nwoca.org/artifactory'
         Project root = gradle.getRootProject()       
-       root.allprojects {
+        root.allprojects {
+               
             def thisProject = delegate        
             configurations.all {
                 resolutionStrategy.cacheChangingModulesFor 60 * 60 * 8, 'seconds'
@@ -66,7 +69,8 @@
                         changingPattern = '.*SNAPSHOT'   
                         force = true
                     }                       
-                }                
+                }                   
+
                 add(new org.apache.ivy.plugins.resolver.URLResolver()) {
                     name = 'ssdt-snapshots'
                     m2compatible =  true
@@ -76,18 +80,25 @@
                     addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml")
                     checkmodified = true
                     changingMatcher = 'regexp'
-                    changingPattern = '.*SNAPSHOT'                  
-                }
-                add(new org.apache.ivy.plugins.resolver.URLResolver()) {                
+                    changingPattern = '.*SNAPSHOT'
+                   }
+
+                add(new org.apache.ivy.plugins.resolver.URLResolver()) {
                     name = 'ssdt-releases'
                     m2compatible = false
                     def url = "${ssdtArtifactory}/ssdt-releases"
                     addArtifactPattern("${url}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]")
                     addArtifactPattern("${url}/[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]")
-                    addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml")                   
+                    addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml")
                 }
-                mavenRepo name: 'ssdt-repo', url: "${ssdtArtifactory}/ssdt-repo"
-                 
+
+
+                maven {
+                    name = 'ssdt-repository'
+                    url = "${ssdtArtifactory}/repository"
+                }
+
+                              
             }           
             
             if ( thisProject.repositories.find { it.name == 'local' } ) {