Mercurial > public > develkit
view init.gradle @ 76:15a5fd89d80b
add display of envs for bamboo testing
author | smith@nwoca.org |
---|---|
date | Mon, 06 Feb 2012 14:19:18 -0500 |
parents | 02cc8e50945e |
children | e9605748e5ce |
line wrap: on
line source
logger.debug("applying SSDT artifactory Gradle Settings") gradle.addListener(new ArtifactoryGradleSettings()) println "Environment: " println "----------------------------" System.getenv().each { k,v -> println " $k = $v" } subprojects { task cleanLocal << { def local = project.repositories.find { it.name == 'local' } println local if ( local ) { } } task publishLocal(dependsOn: 'uploadArchives') << { println "published to local repository" } } class ArtifactoryGradleSettings extends BuildAdapter implements BuildListener { def void projectsEvaluated(Gradle gradle) { Project root = gradle.getRootProject() root.subprojects { 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" } } repositories { flatDir { name "local" dirs System.properties['user.home'] + "/.ssdt/local-repo" } 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' } uploadArchives { repositories { if ( project.repositories.find { it.name == 'local' } ) { add project.repositories.local } } } } } }