# HG changeset patch # User smith@nwoca.org # Date 1351283547 -3600 # Node ID 9ed6a36104edac8f1c24a31812f509095d852b9a # Parent 86fdadd7468a098ab01f5144e68f9bdb34f620ae Improve dependency resolution performance: use gradle resolver instead of ivy and use new repo which does not cnotain snapshots diff -r 86fdadd7468a -r 9ed6a36104ed init.gradle --- 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' } ) {