Are Multiple Filters on a Copy Task guaranteed Order?

Hello All,

I have a Copy task with Multiple filters defined like below

Task(‘myCopy’, type: Copy) {
filter(, tokens: myProps) // filter-1
filter{line-> line.endsWith("@") ? “” : line } //filter-2

Would Copy ensure that filter-1 runs first and then filter-2?

Although, right now I am getting the desired output, I do not want to depend on something that is not guaranteed to be in sequence.

Thank you in advance.

Yes, the underlying implementation of filter(...) on a Copy task guarantees that the filters will run in the order added.

This is a long-standing guarantee (even if not explicitly mentioned in the API documentation) and seems very unlikely to change in future versions as it would be a breaking change and backwards step for reproducible builds.

Thank you very much. This answers my question.