title: Gradle Plugin ‘java-library’ not found
body: <p>I'm having an issue as of late when compiling a java library with Gradle 4.0.1 (this issue was happening with 3.5 as well) on Windows with IntelliJ using the 'java-library' plugin. Here is a snipped of my build script:</p>
  
  <pre><code>buildscript{
      repositories{
          jcenter();
      }
      dependencies{
          classpath 'com.bmuschko:gradle-tomcat-plugin:2.2.5'
          classpath 'org.akhikhl.gretty:gretty:+'
          classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
      }
  }
  
  configurations{
      taglibs{ transitive = false}
      enhance
  }
  
  repositories {
      mavenCentral()
  }
  
  apply plugin: 'java-library'
  apply plugin: 'war'
  apply plugin: 'com.bmuschko.tomcat'
  
  sourceCompatibility = 1.7
  </code></pre>
  
  <p>and here is what happens when I try to build:</p>
  
  <blockquote>
    <p>BUILD FAILED</p>
    
    <p>Total time: 0.115 secs  </p>
    
    <p>Plugin with id 'java-library' not found.</p>
  </blockquote>
  
  <p>This was working fine until recently.</p>