Here is what works for me as Gradle 4.0.
sourceSets { integrationTest { compileClasspath += sourceSets.test.compileClasspath runtimeClasspath += sourceSets.test.runtimeClasspath } } task integrationTest(type: Test) { description = "Runs the integration tests." group = 'verification' testClassesDirs = sourceSets.integrationTest.output.classesDirs classpath = sourceSets.integrationTest.runtimeClasspath }
Starting with version 4.0, Gradle now uses separate class directories for each language in the source set. Therefore, if your build script uses sourceSets.integrationTest.output.classesDir , you will see the following failure warning.
Gradle now uses separate output directories for each JVM language, but this assembly assumes a single directory for all classes from the source set. This behavior is deprecated and should be removed in Gradle 5.0.
To get rid of this warning, just switch to sourceSets.integrationTest.output.classesDirs . See Gradle 4.0 Notes for more information.
Ryan Sobol Aug 02 '17 at 15:31 on 2017-08-02 15:31
source share