Mercurial > public > develkit
comparison init.gradle @ 98:8c578d146476
correct env reference
author | smith@nwoca.org |
---|---|
date | Mon, 05 Mar 2012 21:05:08 +0000 |
parents | bdc17bcaf797 |
children | 333e489c1188 |
comparison
equal
deleted
inserted
replaced
97:bdc17bcaf797 | 98:8c578d146476 |
---|---|
116 def loadEnvironments() { | 116 def loadEnvironments() { |
117 def developerPrivate = new Properties() | 117 def developerPrivate = new Properties() |
118 if (file('private.properties').exists()) { | 118 if (file('private.properties').exists()) { |
119 developerPrivate.load(file('private.properties').newReader()) | 119 developerPrivate.load(file('private.properties').newReader()) |
120 } | 120 } |
121 setProperty 'env', hasProperty('env') ? gradle.env : (developerPrivate.env ?: 'dev') | 121 setProperty 'env', (hasProperty('env') ? env : (developerPrivate.env ?: 'dev')) |
122 println "Environment is: $env" | 122 println "Environment is: $env" |
123 def slurper = new ConfigSlurper(env) | 123 def slurper = new ConfigSlurper(env) |
124 def environment = new ConfigObject() | 124 def environment = new ConfigObject() |
125 def environments = [] | 125 def environments = [] |
126 file('.').eachFileMatch(~/^environment.*\.groovy$/) { envFile -> | 126 file('.').eachFileMatch(~/^environment.*\.groovy$/) { envFile -> |