IntelliJ adds Import to Gradle at Copy Task
<p>I have a very annoying and unexplainable behaviour in IntelliJ 2016.1:</p>

<p>If using Gradle copy task in a build file IntelliJ adds upon any edit in this file this import on top:</p>

<pre><code>com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
</code></pre>

<p>which is of course not necessary since this task is built-in Gradle.
Upon execution this leads to this error:</p>

<blockquote>
  <p>Cannot create task of type 'Copy' as it does not implement the Task
  interface.</p>
</blockquote>

<p>Copy Task is just a simple one like this:</p>

<pre><code>task copyNodeModules(type: Copy) {
    group="_webapp"
    from('./src/main/ts/node_modules') {
        include '**/*'
        exclude '**/lite-server'
        exclude '**/json-server'
        exclude '**/.bin'
    }
    into project.buildDir.path + '/resources/someFolder'
}
</code></pre>