3 ms·
Robolectric testing with the new build system is such a pain in the ass I don't even know where to start. Jake Wharton - author of god knows how many Android li
by krschultz 12y ago
Robolectric testing with the new build system is such a pain in the ass I don't even know where to start. Jake Wharton - author of god knows how many Android libraries - even threw up his hands on it: https://github.com/JakeWharton/gradle-android-test-plugin https://github.com/JakeWharton/gradle-android-test-plugin.
- ZoFreX 12y agoIt's not that hard to get started: https://github.com/zofrex/gradle-template-android-robolectric https://github.com/zofrex/gradle-template-android-robolectri... And the Robolectric team adopted Jake's plugin, by the way: https://github.com/robolectric/robolectric-gradle-plugin https://github.com/robolectric/robolectric-gradle-plugin Also, it is going to get better. At the moment one of the biggest issues is that there is no way for Gradle to expose extra sourcesets to the IDE, this is a limitation of Gradle and not just the Android plugin I believe, and the tools team want the Gradle build to be the single source of truth. They are working to get that added to Gradle (and they have made a lot of positive changes to Gradle already as they build the new tools), and then things like Robolectric will be able to hook in with the IDE just fine.