ApplicationAndroidComponentsExtension

Added in 7.0.0

interface ApplicationAndroidComponentsExtension : AndroidComponentsExtension


Extension for the Android Application Gradle Plugin components.

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

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

Summary

Inherited functions

From com.android.build.api.variant.AndroidComponentsExtension
Unit
beforeVariants(
    selector: VariantSelector,
    callback: Action<ApplicationVariantBuilder>
)

Action based version of beforeVariants above.

Unit
beforeVariants(
    selector: VariantSelector,
    callback: (ApplicationVariantBuilder) -> 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<ApplicationVariant>
)

Action based version of onVariants above.

Unit
onVariants(
    selector: VariantSelector,
    callback: (ApplicationVariant) -> 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.

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

Register an Android Gradle Plugin DSL extension.

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 com.android.build.api.variant.DslLifecycle
Unit

Action based version of finalizeDsl above.

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.

Inherited properties

From com.android.build.api.variant.AndroidComponents
AndroidPluginVersion

The version of the Android Gradle Plugin currently in use.

SdkComponents

Provides access to underlying Android SDK and build-tools components like adb.