Sebastian Schuberth
05/16/2025, 12:09 PMtasks.replace("name")
, I can only do so it I maintain the task's type. However, in my case the task's constructor requires arguments. How can I specify these when replacing a task?Sebastian Schuberth
05/16/2025, 12:10 PM<T extends Task> TaskProvider<T> register(String name, Class<T> type, Object... constructorArgs) throws InvalidUserDataException;
Sebastian Schuberth
05/16/2025, 12:13 PM* What went wrong:
Could not create task ':printVersion'.
> Could not create task of type 'PrintTask'.
> Unable to determine constructor argument #1: missing parameter of type Function0, or no service of type Function0<?>.
Vampire
05/16/2025, 12:35 PMVampire
05/16/2025, 12:36 PMSebastian Schuberth
05/16/2025, 12:58 PMVampire
05/16/2025, 1:23 PMremove
or removeIf
to remove it and then just register a fresh instance.