# DslExtension

# DslExtension

```
@Incubating class DslExtension
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                         ||
| ↳ | [com.android.build.api.variant.DslExtension](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension#) |

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 :

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

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 classes                                                                                                                                                                                                                                     ||
|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|   | [Builder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension.Builder) Creates a[Builder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension.Builder)to instance to create a[DslExtension](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension#)containing all desired extension points to the Android Gradle Plugin DSL. |

|                                                                                                                                                                  ### Properties                                                                                                                                                                   ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Class](http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)\<out[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)\>? | [buildTypeExtensionType](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension#buildTypeExtensionType:java.lang.Class) <br />         |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                         | [dslName](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension#dslName:kotlin.String) <br />                                         |
| [Class](http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)\<out[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)\>? | [productFlavorExtensionType](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension#productFlavorExtensionType:java.lang.Class) <br /> |
| [Class](http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)\<out[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)\>? | [projectExtensionType](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension#projectExtensionType:java.lang.Class) <br />             |

## Properties

### buildTypeExtensionType

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

### dslName

```
val dslName: String
```  

### productFlavorExtensionType

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

### projectExtensionType

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