Gradle (yet?) lacks the functionality of generating the Eclipse filtered resource definitions from the build script. It would be awesome. Unfortunately it is not trivial. Example:
In fact, since the manually generated values looked very much like a milliseconds epoch time, I tried auto-generating the value using System.getCurrentTime, but I get the same problem:
Thanks. That was it. I had copied that line exactly, but I forgot there was another existing “eclipse.doLast” later that was re-writing it again without the preserveWhitespace. I fixed those other unrelated .project XmlNodePrinters and then the spacing was coming out correctly.