diff init.gradle @ 74:a622ec40a570

update repo definitions
author smith@nwoca.org
date Sat, 04 Feb 2012 16:24:38 -0500
parents 174b4bcfd2f2
children 02cc8e50945e
line wrap: on
line diff
--- a/init.gradle	Fri Feb 03 09:57:04 2012 -0500
+++ b/init.gradle	Sat Feb 04 16:24:38 2012 -0500
@@ -1,14 +1,21 @@
 
-logger.debug("Applying Artifactory Gradle Settings")
+logger.debug("applying SSDT artifactory Gradle Settings")
 
 gradle.addListener(new ArtifactoryGradleSettings())
 
 class ArtifactoryGradleSettings extends BuildAdapter implements BuildListener {
 
     def void projectsEvaluated(Gradle gradle) {
+    
+    
         Project root = gradle.getRootProject()
         root.allprojects {
-            println "applying repositories to $it"
+        
+            configurations.all {
+                resolutionStrategy.cacheChangingModulesFor 120, 'minutes'
+                resolutionStrategy.cacheDynamicVersionsFor 120, 'minutes'
+            }
+        
             buildscript {
                 repositories {
                     mavenRepo name: 'plugins-repo', url: "http://repos.ssdt.nwoca.org/artifactory/gradle-plugins"
@@ -16,8 +23,24 @@
             }
 
             repositories {
-                mavenRepo name: 'libs-snapshots', url: 'http://repos.ssdt.nwoca.org/artifactory/libs-snapshots'
-                mavenRepo name: 'libs-releases', url: 'http://repos.ssdt.nwoca.org/artifactory/libs-releases'
+
+                add(new org.apache.ivy.plugins.resolver.URLResolver()) {
+                  name = 'ssdt-snapshots'
+                  m2compatible =  true
+                  url = 'http://repos.ssdt.nwoca.org/artifactory/ssdt-snapshots'
+                  addArtifactPattern('http://repos.ssdt.nwoca.org/artifactory/ssdt-snapshots/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]')
+                  addIvyPattern('http://repos.ssdt.nwoca.org/artifactory/ssdt-snapshots/[organization]/[module]/ivy-[revision].xml')
+                  checkmodified = true
+                  changingMatcher = 'regexp'
+                  changingPattern = '.*SNAPSHOT'                  
+                }
+                add(new org.apache.ivy.plugins.resolver.URLResolver()) {
+                  name = 'ssdt-releases'
+                  m2compatible = false
+                  url = 'http://repos.ssdt.nwoca.org/artifactory/ssdt-releases'
+                  addArtifactPattern('http://repos.ssdt.nwoca.org/artifactory/ssdt-releases/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]')
+                  addIvyPattern('http://repos.ssdt.nwoca.org/artifactory/ssdt-releases/[organization]/[module]/ivy-[revision].xml')
+                }
                 mavenRepo name: 'ssdt-repo', url: 'http://repos.ssdt.nwoca.org/artifactory/ssdt-repo'
             }
         }