title: How to configure Firebase Performance Monitoring plugin extension in Gradle Kotlin DSL
body: <p>I have an Android app using Gradle with Kotlin DSL. I'm adding Firebase Performance Monitoring, but I would like for it to be enabled only for a specific build type.</p>
  
  <p>I've been following the instructions provided at <a href="https://firebase.google.com/docs/perf-mon/disable-sdk?platform=android#disable-gradle-plugin" rel="noreferrer">Firebase - Disable Firebase Performance Monitoring</a>. Unfortunately the provided snippets are in Groovy.</p>
  
  <p>I've tried to get a reference to the Firebase Performance Monitoring extension in my app level Gradle script by doing the following:</p>
  
  <pre><code>    plugins {
          ...
          id("com.google.firebase.firebase-perf")
          kotlin("android")
          kotlin("android.extensions")
          kotlin("kapt")
      }
  
      buildTypes {
          getByName(BuildTypes.DEBUG) {
              configure&lt;com.google.firebase.perf.plugin.FirebasePerfExtension&gt; {
                  setInstrumentationEnabled(false)
              }
          }
          ...
      }
  
      ...
  
      dependencies {
          val firebaseVersion = "17.2.1"
          implementation("com.google.firebase:firebase-core:$firebaseVersion")
          implementation("com.google.firebase:firebase-analytics:$firebaseVersion")
          implementation("com.google.firebase:firebase-perf:19.0.5")
      }
  
  </code></pre>
  
  <p>Android Studio doesn't see any problem in this and auto-completes <code>FirebasePerfExtension</code>.
  Unfortunately upon running a Gradle sync I get the following:</p>
  
  <pre><code>Extension of type 'FirebasePerfExtension' does not exist. 
  Currently registered extension types: [ExtraPropertiesExtension, DefaultArtifactPublicationSet, ReportingExtension, SourceSetContainer, JavaPluginExtension, NamedDomainObjectContainer&lt;BaseVariantOutput&gt;, BaseAppModuleExtension, CrashlyticsExtension, KotlinAndroidProjectExtension, KotlinTestsRegistry, AndroidExtensionsExtension, KaptExtension]
  </code></pre>
  
  <p>There's no plugin extension related to Firebase Performance Monitoring.</p>
  
  <p>This is in my project level build.gradle file <code>dependencies</code> block:</p>
  
  <pre><code>classpath("com.google.firebase:perf-plugin:1.3.1")
  </code></pre>
  
  <p>Any help is appreciated! </p>
  
  <p><strong>Update 1</strong></p>
  
  <p>As recommended on the <a href="https://guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/" rel="noreferrer">Gradle - Migrating build logic from Groovy to Kotlin</a> guide at "Knowing what plugin-provided extensions are available" I've ran the <code>kotlinDslAccessorsReport</code> task. None of the resulting extensions seems to be related to Firebase.</p>