I would need a way to remove files from a task inputs.
I’m creating a task with type: JavaExec: this type of task seems to consider any file passed as an arg as a task input. This is quite smart, but in my case one of the arg is actually an OUTPUT, not an input. I’ve added it to the task outputs, but since it’s also considered by Gradle a task input, I cannot make the up-to-date mechanism work appropriately (since at any execution the output file contents change).
The problem is I can’t find any way to remove files from the task inputs: neither TaskInputs API seems to allow this, nor the FileCollection I can get from task.inputs.files does. I can’t even do: task.inputs.files -= task-outputs.files because task.inputs.files is a read-only property.
The only workaround I can think of is to rewrite my task as a generic task and use Project.javaExec(…) for execution. Any help/suggestion would be really appreciated.