Reputation: 9994
In Robolectric sample project, there is no gradle plugin set up in build.gradle. For instance for AppCompat-v7
On the other hand we have Robolectric gradle plugin which as documentation says:
A Gradle plugin which enables Robolectric tests.
This plugin piggy-backs on the unit testing support added in version 1.1.0 of the Android Gradle plugin and configures the test tasks to work correctly with Robolectric.
I wonder why in Robolectric sample project there is no sign of Robolectric Gradle Plugin.
If we can run robolectric tests without the plugin in Android Studio using gradle wrapper, then what is the exact usages of Plugin?
Upvotes: 1
Views: 200
Reputation: 7438
Main reason is that this plugin isn't necessary and will be marked as deprecated if robolectric 3.0 get final. This is a statement from robolectric maintainer erd. See first answer at https://github.com/robolectric/robolectric-gradle-plugin/issues/148
Upvotes: 2