Multiple JUnit source sets

Hi.

Just wondering if it’s possible to have multiple directories that have different roots for JUnit tests?

So I would have

src/test/java

for the code in

src/main/java

but I’d like to be able to store tests in a different directory too like

src/other-tests/java

If it’s possible would an example be possible?

Many thanks.

sourceSets.test.java {
   srcDir 'src/other-tests/java' 
} 

Thanks Lance! That worked a treat. Appreciate the quick response.