Builder

@Incubating class Builder
kotlin.Any
   ↳ com.android.build.api.extension.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

<init>(dslName: String)

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

Public methods

DslExtension

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

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

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

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

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

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

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

Public constructors

<init>

Builder(dslName: String)

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

Parameters
dslName: String the extension point name as it appears in build files.

Public methods

build

fun build(): DslExtension

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

extendBuildTypeWith

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

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

extendProductFlavorWith

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

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

extendProjectWith

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

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