title: Cannot use kotlin-gradle-dsl scripts while using android gradle plugin version 7.0.0-alpha15
body: <p>I updated my Android Studio Canary to version <code>2020 3.1 Canary 15</code> which also required me to update my AGP to version <code>7.0.0-alpha15</code>. I am using <code>kotlin-gradle-dsl</code> as my gradle build files which are now failing to build with an <code>Unresolved reference</code>.</p>
  <p>Note that the gradle was successfully building before updating to version <code>7.0.0-alpha15</code>.</p>
  <p>My app level <code>build.gradle.kts</code> is as follows:</p>
  <pre><code>import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
  
  plugins {
      id(&quot;com.android.application&quot;)
      id(&quot;kotlin-android&quot;)
      id(&quot;kotlin-kapt&quot;)
      id(&quot;dagger.hilt.android.plugin&quot;)
  }
  
  val apiKey: String = gradleLocalProperties(rootDir).getProperty(&quot;API_KEY&quot;)
  
  android {
      compileSdkVersion(30)
      buildToolsVersion(&quot;30.0.3&quot;)
  
      defaultConfig {
          applicationId(&quot;com.training.flicker&quot;)
          minSdkVersion(21)
          targetSdkVersion(30)
          versionCode(1)
          versionName = &quot;1.0&quot;
  
          testInstrumentationRunner = &quot;androidx.test.runner.AndroidJUnitRunner&quot;
          vectorDrawables {
              useSupportLibrary = true
          }
  
          buildConfigField(&quot;String&quot;, &quot;API_KEY&quot;, apiKey)
      }
  
      buildTypes {
          release {
              minifyEnabled(false)
              proguardFiles(
                  getDefaultProguardFile(&quot;proguard-android-optimize.txt&quot;),
                  &quot;proguard-rules.pro&quot;
              )
          }
      }
      compileOptions {
          sourceCompatibility = JavaVersion.VERSION_1_8
          targetCompatibility = JavaVersion.VERSION_1_8
      }
      kotlinOptions {
          jvmTarget = &quot;1.8&quot;
          useIR = true
      }
  
      buildFeatures.compose = true
      composeOptions.kotlinCompilerExtensionVersion = Version.compose
  }
  
  dependencies {
  
      implementation(Android.coreKtx)
      implementation(Android.appCompat)
      implementation(Android.material)
  
      implementation(Retrofit.retrofit)
      implementation(Retrofit.convertorGson)
  
      implementation(Hilt.hiltAndroid)
      kapt(Hilt.hiltKapt)
  
      implementation(Compose.material)
      implementation(Compose.tooling)
      implementation(Compose.ui)
      implementation(Compose.activity)
  
      implementation(Coroutines.android)
  
      implementation(Arch.runtime)
      implementation(Arch.viewModel)
      implementation(Arch.liveData)
  
      testImplementation(Test.junit)
      androidTestImplementation(Test.androidJunit)
      androidTestImplementation(Test.espressoCore)
      androidTestImplementation(Test.composeUi)
  }
  </code></pre>
  <p>This is the error that I am getting</p>
  <pre><code>Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
  public inline operator fun &lt;T : Any, C : NamedDomainObjectContainer&lt;TypeVariable(T)&gt;&gt; TypeVariable(C).invoke(configuration: Action&lt;NamedDomainObjectContainerScope&lt;TypeVariable(T)&gt;&gt;): TypeVariable(C) defined in org.gradle.kotlin.dsl
  public operator fun &lt;T&gt; Closure&lt;TypeVariable(T)&gt;.invoke(): TypeVariable(T) defined in org.gradle.kotlin.dsl
  public operator fun &lt;T&gt; Closure&lt;TypeVariable(T)&gt;.invoke(x: Any?): TypeVariable(T) defined in org.gradle.kotlin.dsl
  public operator fun &lt;T&gt; Closure&lt;TypeVariable(T)&gt;.invoke(vararg xs: Any?): TypeVariable(T) defined in org.gradle.kotlin.dsl
  public operator fun &lt;V&gt; Callable&lt;TypeVariable(V)&gt;.invoke(): TypeVariable(V) defined in org.gradle.kotlin.dsl
  public operator fun &lt;T, R&gt; DeepRecursiveFunction&lt;TypeVariable(T), TypeVariable(R)&gt;.invoke(value: TypeVariable(T)): TypeVariable(R) defined in kotlin
  ...
  </code></pre>