title: How to import external gradle script file with plugins imported correctly in Gradle?
body: <p>I encountered a plugin importing error when applying from an external Gradle script file.
  For example: 
  In file <strong>gradle/lambda.gradle</strong>:</p>
  
  <pre><code>apply plugin: 'base'
  apply plugin: 'jp.classmethod.aws.lambda'
  
  import com.amazonaws.services.lambda.model.InvocationType;
  
  import jp.classmethod.aws.gradle.lambda.AWSLambdaDeleteFunctionTask;
  import jp.classmethod.aws.gradle.lambda.AWSLambdaInvokeTask;
  import jp.classmethod.aws.gradle.lambda.AWSLambdaMigrateFunctionTask;
  import jp.classmethod.aws.gradle.lambda.AWSLambdaPublishVersionTask;
  import jp.classmethod.aws.gradle.lambda.AWSLambdaCreateAliasTask;
  import jp.classmethod.aws.gradle.lambda.AWSLambdaUpdateAliasTask;
  
  import jp.classmethod.aws.gradle.lambda.VpcConfigWrapper
  
  buildscript {
      repositories {
          maven {
              url "https://plugins.gradle.org/m2/"
          }
  
      }
      dependencies {
          classpath "jp.classmethod.aws:gradle-aws-plugin:0.38"
      }
  }
  </code></pre>
  
  <p>In <strong>build.gradle</strong> file I apply the external script by this method:</p>
  
  <pre><code>apply from: 'gradle/lambda.gradle'
  </code></pre>
  
  <p>But it will produce an error about the plugin imports:</p>
  
  <pre><code>Plugin with id 'jp.classmethod.aws.lambda' not found.
  </code></pre>
  
  <p>It can be resolved by including the same buildscript code block in <strong>build.gradle</strong> file. </p>
  
  <p>What's the root cause of this issue?
  What's the recommended way to achieve this goal?</p>