title: Why my gradle projects creates separated modules for main and test in Intellij Idea
body: <p>Recently, I found all my gradle projects in Idea import separated modules for main and test. The modules look like this:</p>
  
  <p><a href="https://i.stack.imgur.com/386GG.png"><img src="https://i.stack.imgur.com/386GG.png" alt="enter image description here"></a></p>
  
  <p>As you can see, there is a "main" module which content root is the src/main and includes only main classes and resources, and there is a "test" module as well. The modules just don't look right. Is this an expected behavior?</p>
  
  <p>The Idea is <code>Intellij Idea 2016.1.1</code> and the gradle is <code>2.11</code></p>
  
  <p>Here is the content of build.gradle</p>
  
  <pre><code>apply plugin: 'idea'
  apply plugin: 'java'
  apply plugin: 'spring-boot'
  apply plugin: "jacoco"
  
  version = getVersion()
  
  sourceCompatibility = 1.8
  targetCompatibility = 1.8
  
  configurations {
      provided
  }
  
  
  sourceSets {
      main {
          compileClasspath += configurations.provided
      }
      test {
          resources {
              srcDir 'src/test/data'
          }
  
          compileClasspath += configurations.provided
      }
  }
  
  processResources {
      filter { String line -&gt; line.replace("{version}", getVersion()) }
  }
  
  processTestResources {
      filter { String line -&gt; line.replace("{version}", getVersion()) }
  }
  
  idea {
      module {
          scopes.PROVIDED.plus += [configurations.provided]
      }
  }
  
  repositories {
      mavenCentral()
  }
  </code></pre>