Using gradle 1.6. I am trying to filter some variables in a .properties file that must be located in the root of a war archive. The properties file contains:
buildNo=@buildNo@
version=@version@
In the build script I have:
import org.apache.tools.ant.filters.ReplaceTokens
war {
from 'war'
def vv = "$project.version"
// Works
println "$vv"
// Fails
filter(ReplaceTokens, tokens: ['version': "$vv"])
// Fails
//filter(ReplaceTokens, tokens: ['version':
'$vv'])
// works
//filter(ReplaceTokens, tokens: ['version': "mumbojumbo"])
}
Is it not possible to use properties in a filter?