As from 4.3 (I think) I have been seeing the following warning:
The TaskInternal.execute() method has been deprecated and is scheduled to be removed in Gradle 5.0. There are better ways to re-use task logic, see https://docs.gradle.org/4.3.1/userguide/custom_tasks.html#sec:reusing_task_logic.
I would not use the method in normal plugin implementations as it does not lead to good practice. However, it is quite useful in some unittests as it allows one to invoke the task directly withou having to remember what the method is with the
Thus my question to Gradle folks are, what would be the recommendation to replace this with in unittests.