Mercurial > public > develkit
comparison 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 |
comparison
equal
deleted
inserted
replaced
137:cc3cd7da35a7 | 138:23e24ef3cd6b |
---|---|
311 logger.info("loading environment $envFile.name") | 311 logger.info("loading environment $envFile.name") |
312 | 312 |
313 def envCfg = slurper.parse(envFile.toURL()) | 313 def envCfg = slurper.parse(envFile.toURL()) |
314 envCfg.merge(slurper.parse(developerPrivate)) | 314 envCfg.merge(slurper.parse(developerPrivate)) |
315 envCfg.put('ssdt.projectid',gradle.ssdtProjectId) | 315 envCfg.put('ssdt.projectid',gradle.ssdtProjectId) |
316 envCfg.put('ssdt.environment',gradle.env) | |
316 if (privateFile.exists()) { | 317 if (privateFile.exists()) { |
317 logger.info("loading private environment $privateFile") | 318 logger.info("loading private environment $privateFile") |
318 envCfg.merge(slurper.parse(privateFile.toURL())) | 319 envCfg.merge(slurper.parse(privateFile.toURL())) |
319 } | 320 } |
320 | 321 |
335 gradle.ext[envName] =envCfg | 336 gradle.ext[envName] =envCfg |
336 environments << envName | 337 environments << envName |
337 } | 338 } |
338 } | 339 } |
339 environment.merge(slurper.parse(developerPrivate)) | 340 environment.merge(slurper.parse(developerPrivate)) |
341 def deployMode = environment.deploy.mode ?: 'development' | |
342 environments.each { gradle.ext[it].put('ssdt.deployment.mode',deployMode) } | |
340 environments << 'environment' | 343 environments << 'environment' |
341 gradle.ext.environment = environment | 344 gradle.ext.environment = environment |
342 gradle.ext.environments = environments | 345 gradle.ext.environments = environments |
343 | 346 |
344 } | 347 } |