DslLifecycle

@Incubating interface DslLifecycle<T>
com.android.build.api.variant.DslLifecycle

Summary

Public methods

abstract Unit
finalizeDsl(callback: (T) -> Unit)

API to customize the DSL Objects programmatically after they have been evaluated from the build files and before used in the build process next steps like variant or tasks creation.

abstract Unit
finalizeDsl(callback: Action<T>)

Action based version of finalizeDsl above.

Public methods

finalizeDsl

abstract fun finalizeDsl(callback: (T) -> Unit): Unit

API to customize the DSL Objects programmatically after they have been evaluated from the build files and before used in the build process next steps like variant or tasks creation.

Example of a build type creation:

androidComponents.finalizeDsl { extension ->
    extension.buildTypes.create("extra")
}

finalizeDsl

abstract fun finalizeDsl(callback: Action<T>): Unit

Action based version of finalizeDsl above.