How do i declare a dependency on a module's test code?

I think this is the answer:

task testJar(type: Jar) {
    classifier = 'tests'
    from sourceSets.test.output
}
1 Like