title: Gradle multi project build with empty projects
body: <p>When applying a multi-project Gradle structure to our project, my <strong>settings.gradle</strong> looks like this:</p>
  <pre class="lang-groovy prettyprint-override"><code>include &quot;source:compA:api&quot;
  include &quot;source:compA:core&quot;
  include &quot;source:compB&quot;
  </code></pre>
  <p><em>gradle projects</em> give me</p>
  <pre class="lang-none prettyprint-override"><code>Root project 'tmp'
  \--- Project ':source'
       +--- Project ':source:compA'
       |    +--- Project ':source:compA:api'
       |    \--- Project ':source:compA:core'
       \--- Project ':source:compB'
  </code></pre>
  <p>This is exactly the directory structure!<br/>
  In my root directory I have a <strong>build.gradle</strong> which applies the java plugin to all subprojects:</p>
  <pre class="lang-groovy prettyprint-override"><code>subprojects {
      apply plugin: 'java'
  }
  </code></pre>
  <p>When building I end up having artifacts for <em>:source:compA</em> which are empty because this is actually not a project just the subdirectories <em>api</em> and <em>core</em> are proper Java projects.</p>
  <p>What's the best way to avoid having an empty artifact?</p>