Gradle String Replacement – no placeholders

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)