I’m in the middle of migrating a project from Intellij IDEA 12 to Android Studio, and we’re trying to set up the Gradle build files to also let us build our project on a continuous integration server. I’m having a lot of trouble migrating the unit tests though.
My unit tests use Robolectric. I’m using the gradle-android-test-plugin to get Robolectric working. My unit tests are under src/test/java, next to the main source files in src/main/java. I have four subprojects included in the root’s settings.gradle and an empty root build.gradle.
The unit tests only run for one of my subprojects when I execute “gradle test”. For all of the other subprojects, the test classes are built and I see them under build/test-classes, but none of the tests are executed.
What could I be missing? I’m totally new to Gradle (and other Java build automation tools), so please let me know if I should be posting any more information about my configuration. Thanks!