Can Android apks be tested with UnitTests in Groovy?

I have an Android project and created some new Unit tests and decided to write them in Groovy. For some reason I can’t get Gradle to notice and build them. Is this possible? The directory with the groovy unit tests are included in If I drop a Java file in that directory it gets noticed and built by Gradle, but the Groovy files are ignored.

I know that I can’t use the Groovy plugin when using the android plugin. I’ve also tried using the groovyx.grooid.groovy-android plugin but that doesn’t help either.

Any thoughts?

Thanks, Derek

You should be able to do this in conjunction with the ‘groovy.grooid.groovy-android’ plugin. You’ll simply have to place your tests in ‘src/test/groovy’ rather than ‘src/test/java’.