Multiple outputs.files

I want to add up-to-date verification’s. If someone of the files is missing, I want to have non-up-to-date. I’m using: task1.outputs.files(“path1/file2.xml”, path2/file2.xml"). When I remove first file - working properly, but when remove second - gradle don’t see it. I need “or” between files, how to use it ? Thanks in advance.