# DslExtension

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/DslExtension.kt+class:com.android.build.api.variant.DslExtension) Added in 7.0.0


```
class DslExtension
```

<br />

*** ** * ** ***

Third party DSL extension configuration.

When a third party plugins needs to extend the Android Gradle Plugin DSL, it needs to indicate the location of these extension elements.

Currently, we support extending :

- \[com.android.build.api.dsl.DefaultConfig\]
- \[com.android.build.api.dsl.BuildType\]
- \[com.android.build.api.dsl.ProductFlavor\]

A plugin can choose to extend one or more of these elements by calling the appropriate methods on the `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension.Builder` like `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension.Builder#extendBuildTypeWith(java.lang.Class)` to extend `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildType`.

Because the number of instances of each extension point is determined during evaluation phase, Gradle will be creating those instances on demand. See full documentation at : https://docs.gradle.org/current/userguide/custom_plugins.html#sec:getting_input_from_the_build

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension.Builder` Creates a `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension.Builder` to instance to create a `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension` containing all desired extension points to the Android Gradle Plugin DSL. |

| ### Public properties |
|---|---|
| `https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension#buildTypeExtensionType()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension#dslName()` |
| `https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension#productFlavorExtensionType()` |
| `https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DslExtension#projectExtensionType()` |

## Public properties

### buildTypeExtensionType

Added in 7.0.0

```
val buildTypeExtensionType: Class<Any>?
```

### dslName

Added in 7.0.0

```
val dslName: String
```

### productFlavorExtensionType

Added in 7.0.0

```
val productFlavorExtensionType: Class<Any>?
```

### projectExtensionType

Added in 7.0.0

```
val projectExtensionType: Class<Any>?
```