title: How come Gradle doesn't see plugin?
body: <pre><code>$ ./gradlew -version
  
  ------------------------------------------------------------
  Gradle 5.0
  ------------------------------------------------------------
  
  Build time:   2018-11-26 11:48:43 UTC
  Revision:     7fc6e5abf2fc5fe0824aec8a0f5462664dbcd987
  
  Kotlin DSL:   1.0.4
  Kotlin:       1.3.10
  Groovy:       2.5.4
  Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
  JVM:          1.8.0_181 (Oracle Corporation 25.181-b13)
  OS:           Mac OS X 10.16 x86_64
  </code></pre>
  <p>I wrote a Gradle plugin that has a task called <code>manageVersion</code>, and it's being used in a lot of our microservices. Here's the our <code>build.gradle</code> file structure common to all of our microservices.</p>
  <pre><code>import com.company.utilities.WidgetVersionPlugin
  
  buildscript {
    repositories {
      mavenCentral()
      jcenter()
      maven {
        url 's3://' + s3_bucket
        authentication {
            awsIm(AwsImAuthentication)
        }
      }
    }
    dependencies {
      classpath &quot;com.company.utilities:widget-version-plugin:3.3.+&quot;
    }
  }
  
  
  plugins {
      id &quot;com.company.microservice.root.java&quot; version &quot;2.0.19&quot;
  }
  
  allprojects {
      apply plugin: 'jacoco'
      apply plugin: WidgetVersionPlugin
      ...
  }
  </code></pre>
  <p>When I run a Gradle command, e.g., <code>./gradlew clean</code> for example, I do see the <code>com.company.utilties:widget-version-plugin:3.3.1</code> being downloaded in my Gradle cache as expected, if it's not already there. So far this has been working.</p>
  <p>Now I implement the <strong>same</strong> <code>build.gradle</code> in a <strong>new</strong> project, and when I run <code>./gradlew clean</code>, I get</p>
  <pre><code>* What went wrong:
  A problem occurred evaluating root project 'company-lambda-runner'.
  &gt; Failed to apply plugin [class 'com.company.utilities.WidgetVersionPlugin']
     &gt; Could not create task ':manageVersion'.
        &gt; java.lang.NullPointerException (no error message)
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  </code></pre>
  <p>What am I missing?</p>