Problem with gradle's additional sourceSets since upgrading to Intellij Idea 13

I introduced the sourceSet ‘integrationTest’ and everything worked fine (Intellj 12, gradle itself of course).

I defined sourceSets, configurations, dependencies as usual:

sourceSets {
    integrationTest {
        compileClasspath = sourceSets.main.output + configurations.integrationTestCompile
        runtimeClasspath = output + sourceSets.main.output + configurations.integrationTestRuntime
  configurations {
    integrationTestCompile.extendsFrom compile, testCompile
    integrationTestRuntime.extendsFrom runtime, integrationTestCompile, testRuntime
  dependencies {
    integrationTestCompile (

At the end of my build file I added the following block to the idea plugin:

idea {
    module {
        //and some extra test source dirs
        testSourceDirs += file('src/integrationTest/java')
        // put additional dependencies on the classpath += configurations.integrationTestCompile += configurations.integrationTestRuntime

Since the update, the dependencies won’t be available in the IDE any more. As said before, with version 12 this worked

How do you integrate with IDEA? By generating project files, or by importing the project? Which of these methods of integration aren’t working with IDEA 13?

I am importing the project directly with Intellij (not using

gradle idea

). The import seems to work flawlessly as there are not errors.

The idea module gets evaluated as far as I can see (the additional testSourceDir gets set). But the

part seems not to work any more – all the libs from the integrationTestCompile dependency are missing in the IDE.

Can you submit this problem to the JetBrains tracker for IDEA? The tooling api that IDEA uses behind the hood supports scopes settings from the build script. Can you gist the build script?

I did. I will give a update once I have feedback.

It works when generating the project files with the gradle idea task.