Stay organized with collections
Save and categorize content based on your preferences.
DslExtension
@Incubating class 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 like Builder.extendBuildTypeWith to extend 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 classes
|
|
Creates a Builder to instance to create a DslExtension containing all desired extension
points to the Android Gradle Plugin DSL.
|
Properties
buildTypeExtensionType
val buildTypeExtensionType: Class<out Any>?
productFlavorExtensionType
val productFlavorExtensionType: Class<out Any>?
projectExtensionType
val projectExtensionType: Class<out Any>?
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DslExtension\n============\n\n```\n@Incubating class DslExtension\n```\n\n|---|-------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [com.android.build.api.variant.DslExtension](#) |\n\nThird party DSL extension configuration.\n\nWhen a third party plugins needs to extend the Android Gradle Plugin DSL, it needs to indicate\nthe location of these extension elements.\n\nCurrently, we support extending :\n\nA plugin can choose to extend one or more of these elements by calling the appropriate methods on\nthe [Builder](/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension.Builder) like [Builder.extendBuildTypeWith](/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](../dsl/BuildType.html#).\n\nBecause the number of instances of each extension point is determined during evaluation phase,\nGradle will be creating those instances on demand. See full documentation at :\nhttps://docs.gradle.org/current/userguide/custom_plugins.html#sec:getting_input_from_the_build\n\nSummary\n-------\n\n| ### Nested classes ||\n|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension.Builder) Creates a [Builder](/reference/tools/gradle-api/7.0/com/android/build/api/variant/DslExtension.Builder) to instance to create a [DslExtension](#) containing all desired extension points to the Android Gradle Plugin DSL. |\n\n| ### Properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|\n| [Class](http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)\\\u003cout [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)\\\u003e? | [buildTypeExtensionType](#buildTypeExtensionType:java.lang.Class) \u003cbr /\u003e |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [dslName](#dslName:kotlin.String) \u003cbr /\u003e |\n| [Class](http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)\\\u003cout [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)\\\u003e? | [productFlavorExtensionType](#productFlavorExtensionType:java.lang.Class) \u003cbr /\u003e |\n| [Class](http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)\\\u003cout [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)\\\u003e? | [projectExtensionType](#projectExtensionType:java.lang.Class) \u003cbr /\u003e |\n\nProperties\n----------\n\n### buildTypeExtensionType\n\n```\nval buildTypeExtensionType: Class\u003cout Any\u003e?\n``` \n\n### dslName\n\n```\nval dslName: String\n``` \n\n### productFlavorExtensionType\n\n```\nval productFlavorExtensionType: Class\u003cout Any\u003e?\n``` \n\n### projectExtensionType\n\n```\nval projectExtensionType: Class\u003cout Any\u003e?\n```"]]