LibraryAndroidComponentsExtension

interface LibraryAndroidComponentsExtension : DslLifecycle, AndroidComponentsExtension


Extension for the Android Library Gradle Plugin components.

This is the androidComponents block when the com.android.library plugin is applied.

Only the Android Gradle Plugin should create instances of interfaces in com.android.build.api.variant.

Summary

Inherited functions

From class AndroidComponentsExtension
Unit
beforeVariants(
    selector: VariantSelector?,
    callback: Action<LibraryVariantBuilder?>?
)

Action based version of beforeVariants above.

Unit
beforeVariants(
    selector: VariantSelector?,
    callback: ((LibraryVariantBuilder) -> Unit)?
)

Method to register a callback to be called with VariantBuilderT instances that satisfies the selector.

Unit

This function is deprecated. Replaced by finalizeDsl

Unit
onVariants(selector: VariantSelector?, callback: Action<LibraryVariant?>?)

Action based version of onVariants above.

Unit
onVariants(selector: VariantSelector?, callback: ((LibraryVariant) -> Unit)?)

Allow for registration of a callback to be called with variant instances of type VariantT once the list of com.android.build.api.artifact.Artifact has been determined.

@Incubating Unit
registerExtension(
    dslExtension: DslExtension?,
    configurator: ((variantExtensionConfig: VariantExtensionConfig<LibraryVariant>) -> VariantExtension)?
)

Register an Android Gradle Plugin DSL extension.

@Incubating Unit

Register a new source type to all source sets.

VariantSelector

Creates a VariantSelector instance that can be configured to reduce the set of ComponentBuilder instances participating in the beforeVariants and onVariants callback invocation.

From class DslLifecycle
Unit

Action based version of finalizeDsl above.

Unit
finalizeDsl(callback: ((LibraryExtension) -> 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.