DslExtension.Builder

Added in 7.0.0

@Incubating
class DslExtension.Builder


Creates a Builder to instance to create a DslExtension containing all desired extension points to the Android Gradle Plugin DSL.

Summary

Public constructors

Builder(dslName: String)

Public functions

DslExtension

Builds the final DslExtension instance that can be used with the AndroidComponentsExtension.registerExtension API

DslExtension.Builder
extendBuildTypeWith(typeExtension: Class<Any>)

Registers an extension point for the com.android.build.api.dsl.BuildType

DslExtension.Builder

Registers an extension point for the com.android.build.api.dsl.ProductFlavor

DslExtension.Builder
extendProjectWith(typeExtension: Class<Any>)

Registers an extension point for the module's DSL, it will be available under the android block.

Public constructors

Builder

Added in 7.0.0
Builder(dslName: String)
Parameters
dslName: String

the extension point name as it appears in build files.

Public functions

build

Added in 7.0.0
fun build(): DslExtension

Builds the final DslExtension instance that can be used with the AndroidComponentsExtension.registerExtension API

extendBuildTypeWith

fun extendBuildTypeWith(typeExtension: Class<Any>): DslExtension.Builder

Registers an extension point for the com.android.build.api.dsl.BuildType

extendProductFlavorWith

fun extendProductFlavorWith(typeExtension: Class<Any>): DslExtension.Builder

Registers an extension point for the com.android.build.api.dsl.ProductFlavor

extendProjectWith

fun extendProjectWith(typeExtension: Class<Any>): DslExtension.Builder

Registers an extension point for the module's DSL, it will be available under the android block.