lundi 16 mai 2016

gradle’s test sourceSets aren't synced with IDEA since upgrading to Intellij 16

In Intellij's previous versions it was sufficient to have in my build.gradle the followings for intellij to show in the project tree the integrationTest dir marked as test source when using the "refresh" in the gradle plugin bar:

sourceSets {
integrationTest {
    java {
        compileClasspath += main.output + test.output
        runtimeClasspath += main.output + test.output
        srcDir 'src/integrationTest/java'
    }
 }

}

configurations {
    integrationTestCompile.extendsFrom testCompile
    integrationTestRuntime.extendsFrom testRuntime
}

task integrationTest(type: Test) {
    testClassesDir = project.sourceSets.integrationTest.output.classesDir
    classpath = project.sourceSets.integrationTest.runtimeClasspath
    it.shouldRunAfter test
}

however in Intellij 16, it doesn't work anymore. adding following block and running the idea task didn't help either:

idea {
module {
    testSourceDirs += file('src/integrationTest/java')
    scopes.TEST.plus += configurations.integrationTestCompile
    scopes.TEST.plus += configurations.integrationTestRuntime
  }
}

what could be the problem?

Aucun commentaire:

Enregistrer un commentaire