However, it seems that the filter method as other shortcomings: - Using the ReplaceTokens ant filter (as proposed in the documentation) requires a Hashtable, which does not accept null as key or value. So, I cannot directly use the HashMap project.properties. - ReplaceTokens only allows a single character delimiter, in turn, we cannot use the maven default syntax (${…}) for filtering (we have some shared resource files that are used both by maven and gradle).
The documentation only sparingly describes the differences between expand and filter. The 64k limit should really be explicitly stated IMHO.
I could probably work around these limitations one way or another, but I will submit a ticket on the subject I think. (filtering is such an important feature, we should at least have parity with maven)