DslExtension.Builder

@Incubating
public final 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

Public methods

final @NonNull DslExtension

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

final @NonNull DslExtension.Builder

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

final @NonNull DslExtension.Builder

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

final @NonNull DslExtension.Builder

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

Public constructors

Builder

public Builder(@NonNull String dslName)
Parameters
@NonNull String dslName

the extension point name as it appears in build files.

Public methods

build

public final @NonNull DslExtension build()

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

extendBuildTypeWith

public final @NonNull DslExtension.Builder extendBuildTypeWith(@NonNull Class<@NonNull Object> typeExtension)

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

extendProductFlavorWith

public final @NonNull DslExtension.Builder extendProductFlavorWith(@NonNull Class<@NonNull Object> typeExtension)

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

extendProjectWith

public final @NonNull DslExtension.Builder extendProjectWith(@NonNull Class<@NonNull Object> typeExtension)

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