title: How to configure Eclipse with Gradle in multi project?
body: <p>I'm using Eclipse Mars, Buildship plugin, JDK 1.8 and Gradle 2.9 on OS X</p>
  
  <p>I need below structure in Eclipse. How to configure and create?</p>
  
  <pre><code>my-examples/
      settings.gradle
      01_example/
          build.gradle
          src/main/java
          src/main/resources
          src/test/java
          src/test/resources
      02_example/
          build.gradle
          src/main/java
          src/main/resources
          src/test/java
          src/test/resources
      03_example/
          build.gradle
          src/main/java
          src/main/resources
          src/test/java
          src/test/resources
  </code></pre>
  
  <p>The root directory <code>my-examples</code> is just wraps sub directories(<code>01_example</code>, <code>02_example</code>, <code>03_example</code>). </p>
  
  <hr>
  
  <p>Here is <code>build.gradle</code> in root directory I tried to configure:</p>
  
  <pre><code>subprojects {
     apply plugin: 'java'
     sourceCompatibility = 1.8
     targetCompatibility = 1.8
     repositories {
         jcenter()
     }
     task initSourceFolders {
         sourceSets*.java.srcDirs*.each { it.mkdirs() }
         sourceSets*.resources.srcDirs*.each { it.mkdirs() }
     }
  }
  </code></pre>
  
  <hr>
  
  <p>Edited</p>
  
  <p>First, I created a directory and created <code>build.gradle</code> and <code>settings.gradle</code> with <code>include exam1</code>, <code>include exam2</code>, and <code>include exam3</code>.
  Now I imported the project from Gradle Project. The sub directories has been created that I needed.</p>
  
  <p><strong>But</strong> problem is that I can't create another sub directory in Eclipse and it's same in shell <code>mkdir exam4</code> and <code>gradle build</code>. Always It has been created normal folder.</p>
  
  <p><a href="http://i.stack.imgur.com/NR74b.png" rel="noreferrer">Project workspace in Eclipse</a></p>