TestComponent

public interface TestComponent extends Component

Known direct subclasses
AndroidTest

Properties for the android test Variant of a module.

UnitTest
Known indirect subclasses
UnitTest

This interface is deprecated. Use the com.android.build.api.variant package


Summary

Public methods

abstract @NonNull MapProperty<@NonNull String, @NonNull String>

MapProperty of the test component's manifest placeholders.

Inherited methods

From com.android.build.api.variant.Component
abstract @NonNull Configuration

Access to the variant's annotation processor Configuration; for example, the debugAnnotationProcessor Configuration for the debug variant.

abstract @NonNull Artifacts

Access to the variant's buildable artifacts for build customization.

abstract @NonNull FileCollection

Access to the variant's compile classpath.

abstract @NonNull Configuration

Access to the variant's compile Configuration; for example, the debugCompileClasspath Configuration for the debug variant.

abstract @NonNull Instrumentation

Access to the variant's instrumentation options.

abstract @NonNull JavaCompilation

Access to the variant's java compilation options.

abstract @NonNull Provider<@NonNull String>

The namespace of the generated R and BuildConfig classes.

abstract @NonNull Configuration

Access to the variant's runtime Configuration; for example, the debugRuntimeClasspath Configuration for the debug variant.

abstract @NonNull Sources

Access to variant's source files.

abstract void

This method is deprecated. Will be removed in v9.0, use the instrumentation block.

abstract void
<ParamT extends InstrumentationParameters> transformClassesWith(
    @NonNull Class<@NonNull AsmClassVisitorFactory<@NonNull ParamT>> classVisitorFactoryImplClass,
    @NonNull InstrumentationScope scope,
    @NonNull Function1<@NonNull ParamT, Unit> instrumentationParamsConfig
)

This method is deprecated. Will be removed in v9.0, use the instrumentation block.

From com.android.build.api.variant.ComponentIdentity
abstract String

Build type name, might be replaced with access to locked DSL object once ready.

abstract String

The multi-flavor name of the variant.

abstract @NonNull String

Component's name.

abstract @NonNull List<@NonNull Pair<@NonNull String, @NonNull String>>

List of flavor names, might be replaced with access to locked DSL objects once ready.

Public methods

getManifestPlaceholders

abstract @NonNull MapProperty<@NonNull String, @NonNull StringgetManifestPlaceholders()

MapProperty of the test component's manifest placeholders.

Placeholders are organized with a key and a value. The value is a String that will be used as is in the merged manifest.