title: Error:BUG! exception in phase 'class generation' in source unit '_BuildScript_' unsupported Target MODULE
body: <p>I'm trying to create a new <strong>Java 9</strong> project using <strong>gradle</strong> but right after project creation I received error from gradle:</p>
  
  <pre><code>Error:BUG! exception in phase 'class generation' in source unit '_BuildScript_' unsupported Target MODULE
  </code></pre>
  
  <p>Java version: 9 (build 9+178)<br>
  Gradle version: 4.1-rc-2</p>
  
  <p>According to <a href="https://guides.gradle.org/building-java-9-modules/" rel="noreferrer">this</a> article those java/gradle versions should be compatible.<br>
  How can I solve this problem?<br><br>
  Any help highly appreciated.</p>