Gradle Multi-project testing

I have Gradle multi-project setup with one sub-project being JAVA library and second one being Android library. The Android sub-project has ‘andrroid-library’ plugin applied. Both projects has corresponding unit tests. I needed to run this unit tests on Jenkins. Issue: Since Android project doesn’t have gradle task ‘test’, Jenkins doesn’t run these tests. It only runs tests from Java project. Please suggest solution, or documentation or any helpful links to existing projects. Thanks

Android projects do not have a good unit-testing support. This was true for their original build system built around Ant and still holds for their Gradle based tooling. contains several threads discussing how to set up unit test using various frameworks (like Robolectric). And generally you will find documentation for this build system at