TestAndroidComponentsExtension

interface TestAndroidComponentsExtension : AndroidComponentsExtension


Extension for the Android Test Gradle Plugin components.

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

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

Summary

Inherited functions

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

Action based version of beforeVariants above.

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

Action based version of onVariants above.

Unit
onVariants(selector: VariantSelector, callback: (TestVariant) -> 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<TestVariant>) -> 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 com.android.build.api.variant.DslLifecycle
Unit

Action based version of finalizeDsl above.

Unit
finalizeDsl(callback: (TestExtension) -> 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 class com.android.build.api.variant.AndroidComponentsExtension
AndroidPluginVersion

The version of the Android Gradle Plugin currently in use.

SdkComponents

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