Gradle String Replacement - no placeholders

gradle, groovy

Solution

I assume you are talking about resource processing. In that case, you can use the free-form `filter` method:

processResources {
  filter { String line -> line.replace(...) }
}

Problem

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`.

Original source