6

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
}

it should look like in this screenshot. 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?

Lika
  • 1,043
  • 2
  • 10
  • 13
  • yes, same here with my setup http://stackoverflow.com/a/37882006/529977 ... don't get it. Even I don't like to have any idea or eclipse or any else ide specific plugin and config in my build system aka gradle ... I bet there is an error in the IDEa 16 release, so we should file a bug at https://youtrack.jetbrains.com (if there is not already one I missed on search) P.S: there are much more issues, like code finds are not resolved properly anymore (method usages, etc) – childno͡.de Jun 30 '16 at 07:24
  • P.S: seems to, IDEa behaviour is correct, since gradle java plugin doesn't allow explicit declaration of a "test'ing" set aside the default "test sourceSet" ;/ – childno͡.de Jun 30 '16 at 07:35
  • https://youtrack.jetbrains.com/issue/IDEA-151925 – igr May 09 '17 at 03:58

0 Answers0