I have an ant project that I am converting to gradle. There is something like this in the ant project:
<copy todir="dest_dir">
<fileset>
...
</fileset>
<filterchain>
<expandproperties/>
</filterchain>
</copy>
A filter chain extends properties such as ${property}, but ignores dollar signs without braces. I am trying to reproduce this behavior in gradle.
If I expand, as shown below, gradle extends the files like a groovy template that tries to expand dollar signs with curly braces.
copy {
from 'source_dir'
into 'dest_dir'
expand(project.properties)
}
If I am filterwith an ant filter class ExpandProperties, I get a NullPointerException. Is there an easy way to do this I missed?
source
share