diff init.gradle @ 138:23e24ef3cd6b

add environment properties for ssdt.environment and deployment.mode
author smith@nwoca.org
date Fri, 13 Sep 2013 23:50:53 +0100
parents cc3cd7da35a7
children 998693eba42e
line wrap: on
line diff
--- a/init.gradle	Fri Sep 13 17:09:17 2013 +0100
+++ b/init.gradle	Fri Sep 13 23:50:53 2013 +0100
@@ -313,6 +313,7 @@
         def envCfg = slurper.parse(envFile.toURL())
         envCfg.merge(slurper.parse(developerPrivate))
 		envCfg.put('ssdt.projectid',gradle.ssdtProjectId)
+		envCfg.put('ssdt.environment',gradle.env)
         if (privateFile.exists()) {
             logger.info("loading private environment $privateFile")
             envCfg.merge(slurper.parse(privateFile.toURL()))
@@ -337,6 +338,8 @@
         }
     }    
     environment.merge(slurper.parse(developerPrivate))
+	def deployMode = environment.deploy.mode ?: 'development'
+	environments.each { gradle.ext[it].put('ssdt.deployment.mode',deployMode) } 
     environments << 'environment'
     gradle.ext.environment = environment
     gradle.ext.environments = environments