That’s not how Gradle works… Each task will run either once or not at all for each build execution. A task will never run twice (unless you hack a call to Task.execute())
If you want to run a task with two sets of inputs/outputs you’ll need two separate task instances