Hello,
I’m converting the following ant code to gradle and I’m unable to figure out how to do the regex portion in gradle:
<copy...>
<filterchain>
<striplinecomments>
<comment value="#"/>
</striplinecomments>
<tokenfilter>
<ignoreBlank/>
</tokenfilter>
<replaceregex pattern="\s*(\S+)\s*="
replace="@@KEY.\1@@="/>
</filterchain>
</copy>
gradle code: …
def regexp = new org.apache.tools.ant.types.RegularExpression()
regexp.pattern = '[^ \n\t\r]+'
filter(org.apache.tools.ant.filters.StripLineComments, comments: ["#"])
filter(org.apache.tools.ant.filters.LineContainsRegExp, regexps:[regexp])
// how to do regex replacement filter?
Thank you in advance!