You could maybe use a code sharing service such as Github?
**EDIT - I have just found the ant docs for the copy task and theres a clear message about filtering binaries:
Note: If you employ filters in your copy operation, you should limit the copy to text files. Binary files will be corrupted by the copy operation. This applies whether the filters are implicitly defined by the filter task or explicitly provided to the copy operation as filtersets. See encoding note.
**EDIT **EDIT - Gradle uses the Ant implementation for ReplaceToken()