try this instead:
apply plugin: 'java' sourceSets { test { java { srcDirs = ['src/test/unit/java'] } } } task outputDirs << { sourceSets.test.java.srcDirs.each{f -> println(f)}}
This reassigns the list of source directories (there is only one here) for the srcDirs property. using
srcDirs = 'src/test/unit/java'
as in your example, it simply adds another source folder to the existing ones.
Regards, Renee
source share