How can I get ant behavior when expanding properties with gradle? -
I have an ant project which I am converting to gradle. In the ant project, there is something like this:
& copy; Copy todir = "dest_dir" & gt; & Lt; Fileset & gt; ... & lt; / Fileset & gt; & Lt; Filterchain & gt; & Lt; Expandproperties / & gt; & Lt; / Filterchain & gt; & Lt; / Copy & gt; Extends the filter chain properties like $ {property} , but ignoring the dollar signs without brakes I try to replicate this behavior in gradle I am doing If I have expanded , then gradle spreads files as a Groovy template, which tries to expand the dollar sign with braces. / P> Copy 'source_dir' to 'dest_dir' (project.properties)} If I type with filter ant < Code> ExpandProperties Filter class, I get a NullPointerException. Is there an easy way to do this?
Okay, I understood that the ExpandProperties filter needs to set its project property with ant project is. In this way I have been configured to work it:
Copy 'source_dir' to 'dest_dir' filter (org.apache.tools.ant.filters.ExpandProperties, project: ant .antProject)} This property, such as $ {property} spreads in the same way as ant, slipping on dollar signs without brakes .
Comments
Post a Comment