This is nice, but it does not test much. I have a custom plugin with custom tasks that I would like to fully test with Gradle testing framework, but I do not find any way to execute completely a task - with its dependencies. Is there any way to do it ? If it is not, how can I completely test my plugin ? :S
Your best option is to keep your task implementation as skinny as possible (this is a good thing to do for other reasons as well). By this I mean, use your task as an adapter to the Gradle execution mechanism and keep your real logic in POJOs. This may seem like overkill, but it’s the simplest way to exercise your code right now.
If you’re interested in living on the edge, you can take a look at some spike code I did on the side to explore possibilities in this space.
Thanks for the detailed and quick answer. I will do as you suggest, I was just kind of hoping something more adequate existed :-). And I will anxiously wait for the spec implementation :-).