Is it possible to do simple string replacement in gradle where placeholders / tokens can not be used.
For example: given temp.txt replace all occurences of xxx with yyy.
Read the text in:
String contents = new File( 'whatever.txt' ).getText( 'UTF-8' ) Replace the text
contents = contents.replaceAll( 'xxx', 'yyy' ) Write the text out again
new File( 'replaced.txt' ).write( contents, 'UTF-8' ) You should be able to wrap them into a task and call the task as normal
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With