comparison init.gradle @ 170:e7824d2c2ca0

treat property rules as always out of date
author smith@nwoca.org
date Fri, 27 Jun 2014 15:40:12 +0100
parents c4b7c8a11913
children 5553cbb25af7
comparison
equal deleted inserted replaced
169:c4b7c8a11913 170:e7824d2c2ca0
227 if ((taskName - 'Test').endsWith("AsProperties") && !taskName.startsWith('clean')) { 227 if ((taskName - 'Test').endsWith("AsProperties") && !taskName.startsWith('clean')) {
228 def t = taskName.contains('Test') ? processTestResources.destinationDir : processResources.destinationDir 228 def t = taskName.contains('Test') ? processTestResources.destinationDir : processResources.destinationDir
229 def e = (taskName - 'Test' - 'AsProperties').capitalize() 229 def e = (taskName - 'Test' - 'AsProperties').capitalize()
230 task(taskName) { 230 task(taskName) {
231 ext.propertyFile = new File(t, "${e.toLowerCase()}.properties") 231 ext.propertyFile = new File(t, "${e.toLowerCase()}.properties")
232 inputs.files "../environment${e}.groovy", "../private${e}.groovy", '../private.properties' 232 inputs.files "../environment${e}.groovy", "../private${e}.groovy", '../private.properties'
233 outputs.file propertyFile
234 doLast { 233 doLast {
235 t.mkdirs() 234 t.mkdirs()
236 gradle."environment${e}".toProperties().store(propertyFile.newOutputStream(), "by $taskName of $this") 235 gradle."environment${e}".toProperties().store(propertyFile.newOutputStream(), "by $taskName of $this")
237 } 236 }
238 } 237 }