Task working on project folder should not depend on all other tasks

Hi.
I wrote a task in java that scans all files in the project folder to do things with those files.
I do not care about the build folder, but of course it is included.
My problem now is that, as my input folder is basically the putput folder of all other tasks, gradle compains since version 8, that my task should depend on all other tasks. That is not an option, I need to run my task also standalone.
So is there any other possibility to tell gradle that it is ok that my input folder might change when other task run, as I do not care about those changes?
Thanks and regards, Stefan

You should probably simple not define the project dir as input.

Yes, that’s correct. But my task needs to start in the project root, so now I do not define this as task input.
And yes, this destroys all of gradles logic for interdependent tasks, but this task is and will be stand alone.
So, after removing this, it works again. And I think I understood another part of gradle, maybe.
Thanks.

1 Like