title: IntelliJ IDEA and Gradle: Why there are 3 modules per sub-module?
body: <p>I am rather confused by IntelliJ IDEA's gradle integration and the mapping of gradle subprojects to IDEA's modules.</p>
  
  <ul>
  <li>Why are there 3 modules for every gradle subproject (client, client_main and client_test)?</li>
  <li>Is there a way to get rid of the "parent" module? Every time I delete it my build breaks in confusing ways.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/nhxlH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nhxlH.png" alt="Project Structure"></a></p>
  
  <p><strong>UPDATE</strong></p>
  
  <ul>
  <li>The content root of the third module ("server") is always set to the entire folder like seen below. This means I can't mark directories in build as generated sources, since the are excluded by default.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/FnTB4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FnTB4.png" alt="enter image description here"></a></p>