title: Gradle plugin build pulls in wrong version of commons-io
body: <p>What appears to be happening is that <code>compileJava</code> pulls in <code>commons-io-1.4.jar</code> from the gradle distribution, in preference to my declared <code>commons-io:commons-io:2.4</code>. When I try to call a method (<code>readLines(InputStream, Charset)</code>) introduced in a later version, Gradle can't find it:</p>
  
  <pre><code>$ gradle compileJava
  :compileJava
  /home/dmoles/Projects/m12n-plugins/tools/m12n/multiproject-plugin/src/main/java/m12n/tools/multiproject/dependencies/DependencyExtractor.java:42: error: no suitable method found for readLines(ByteArrayInputStream,Charset)
              List&lt;String&gt; lines = IOUtils.readLines(new ByteArrayInputStream(stream.toByteArray()), Charsets.UTF_8);
                                          ^
      method IOUtils.readLines(Reader) is not applicable
        (actual and formal argument lists differ in length)
      method IOUtils.readLines(InputStream,String) is not applicable
        (actual argument Charset cannot be converted to String by method invocation conversion)
      method IOUtils.readLines(InputStream) is not applicable
        (actual and formal argument lists differ in length)
  1 error
  :compileJava FAILED
  
  FAILURE: Build failed with an exception.
  </code></pre>
  
  <p>The <code>dependencies</code> section of my <code>build.gradle</code> (abbreviated):</p>
  
  <pre><code>dependencies {
    compile 'commons-io:commons-io:2.4'
    compile gradleApi()
    compile localGroovy()
  }
  </code></pre>
  
  <p><code>gradle dependencies</code> shows the right thing:</p>
  
  <pre><code>+--- commons-io:commons-io:2.4
  </code></pre>
  
  <p>Obviously in this specific case I can work around it by calling the older method, but is there a general fix for this? I don't want to have to individually track down every time I happen to use a library that's also used by Gradle itself.</p>