diff init.gradle @ 77:e9605748e5ce

disable local publish for bamboo builds
author smith@nwoca.org
date Mon, 06 Feb 2012 15:27:43 -0500
parents 15a5fd89d80b
children e47f80ef056b
line wrap: on
line diff
--- a/init.gradle	Mon Feb 06 14:19:18 2012 -0500
+++ b/init.gradle	Mon Feb 06 15:27:43 2012 -0500
@@ -3,9 +3,8 @@
 
 gradle.addListener(new ArtifactoryGradleSettings())
 
-println "Environment: "
-println "----------------------------"
-System.getenv().each { k,v -> println "    $k = $v" }
+gradle.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')}
+logger.info "bamboo build: $gradle.bambooBuild"
 
 subprojects {
 
@@ -42,10 +41,12 @@
             
             repositories {
 
-                flatDir {
-                    name "local"
-                    dirs System.properties['user.home'] + "/.ssdt/local-repo"
-                }    
+                if (!gradle.bambooBuild) {
+                    flatDir {
+                        name "local"
+                        dirs System.properties['user.home'] + "/.ssdt/local-repo"
+                    }    
+                }
                 
                 add(new org.apache.ivy.plugins.resolver.URLResolver()) {
                   name = 'ssdt-snapshots'