changeset 273:f5c641647fc6

add support for bamboo builds using a local repo
author smith@nwoca.org
date Tue, 05 Mar 2019 20:49:31 +0000
parents 1d63556430a6
children 068637778a0d
files init40.gradle
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/init40.gradle	Thu Jan 10 17:22:09 2019 +0000
+++ b/init40.gradle	Tue Mar 05 20:49:31 2019 +0000
@@ -40,6 +40,16 @@
     it.key.toLowerCase().contains('bamboo')
 } || hostname?.startsWith('ssdt-ba')
 
+if (!rootProject.hasProperty("bambooLocalBuild")) {
+   gradle.ext.bambooLocalBuild = false
+} else {
+   gradle.ext.bambooLocalBuild = rootProject.bambooLocalBuild.toBoolean()
+} 
+
+if (gradle.bambooLocalBuild) {
+   println "Bamboo local build active"
+}
+
 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-')
 logger.info "Bamboo plan: ${gradle.bambooPlan}"
 
@@ -254,7 +264,7 @@
     it.ext.environment = gradle.environment
 
     dependencyLocking {
-        if (gradle.branch.isRelease() ) {
+        if (gradle.branch.isRelease()) {
             lockAllConfigurations()
         }
     }
@@ -414,7 +424,7 @@
 
             repositories {
 
-                if (!gradle.bambooBuild) {
+                if (!gradle.bambooBuild || gradle.bambooLocalBuild) {
                     ivy {
                         name = 'local'
                         artifactPattern gradle.ivyUserDir + '/local/[artifact]-[revision](-[classifier]).[ext]'