I’m developing a Gradle plugin (Genymotion) that is adding some custom tasks belonging to another third party plugin (Android).
I need to test that my plugin injects correctly its tasks as dependencies of certain tasks from the Android Gradle plugin. To test this, I’m building a
Project stub using the
ProjectBuilder and then I call the
evaluate() method on the project to launch manually the tasks injection (because graph task modifications must be done at evaluation phase for our case). The problem here is that the
evaluate() method is not officially supported.
Another solution would be to use the TestKit to instrument de Project and launch a build. But I did not see on this API a way to explore the graph task generated before the execution. You only have access to the steps executed during the build. Which is not enough to test all my requirements and which is also slightly longer than a simple integration test.
So my question is, did I miss something on the Gradle TestKit that would allow me to check all my tasks are correctly injected?
Second question, what’s the plan about officially supporting evaluation during integration tests? Which is really mandatory on many use cases for third party plugins.