Stay organized with collections Save and categorize content based on your preferences.

AndroidTest

interface AndroidTest : GeneratesTestApk, TestComponent, HasAndroidResources


Properties for the android test Variant of a module.

Summary

Public properties

Property<String>

Variant's application ID as present in the final manifest file of the APK.

MapProperty<StringBuildConfigField<Serializable>>

Variant's BuildConfigField which will be generated in the BuildConfig class.

MapProperty<StringString>

MapProperty of the variant's manifest placeholders.

Provider<String>

The namespace of the generated R and BuildConfig classes.

ListProperty<RegularFile>

List of proguard configuration files for this variant.

SigningConfig?

Variant's signingConfig, initialized by the corresponding DSL element.

Inherited functions

From class com.android.build.api.variant.Component
Unit

This function is deprecated. Use the instrumentation block.

Unit
<ParamT : InstrumentationParameters> transformClassesWith(
    classVisitorFactoryImplClass: Class<AsmClassVisitorFactory<ParamT>>,
    scope: InstrumentationScope,
    instrumentationParamsConfig: (ParamT) -> Unit
)

This function is deprecated. Use the instrumentation block.

From class com.android.build.api.variant.HasAndroidResources
ResValue.Key
makeResValueKey(type: String, name: String)

Make a ResValue.Key to interact with resValues's MapProperty

Inherited properties

From class com.android.build.api.variant.Component
Configuration

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

Artifacts

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

FileCollection

Access to the variant's compile classpath.

Configuration

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

Instrumentation

Access to the variant's instrumentation options.

JavaCompilation

Access to the variant's java compilation options.

Configuration

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

Sources

Access to variant's source files.

From class com.android.build.api.variant.ComponentIdentity
String?

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

String?

The multi-flavor name of the variant.

String

Component's name.

List<Pair<StringString>>

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

From class com.android.build.api.variant.GeneratesApk
AndroidResources

Variant's android resources processing configuration, initialized by the corresponding global DSL element.

ApkPackaging

Variant's packagingOptions, initialized by the corresponding global DSL element.

Renderscript?

Variant specific settings for the renderscript compiler.

From class com.android.build.api.variant.GeneratesTestApk
Property<Boolean>

The functionalTest value to use to run the tests.

Property<Boolean>

The handleProfiling value to use to run the tests.

Property<String>

The instrumentationRunner to use to run the tests.

Property<String?>

The test label.

From class com.android.build.api.variant.HasAndroidResources
Property<Boolean>

Variant's is pseudo locales enabled, initialized by the corresponding DSL elements.

MapProperty<ResValue.KeyResValue>

Variant's ResValue which will be generated.

Public properties

applicationId

val applicationIdProperty<String>

Variant's application ID as present in the final manifest file of the APK.

buildConfigFields

val buildConfigFieldsMapProperty<StringBuildConfigField<Serializable>>

Variant's BuildConfigField which will be generated in the BuildConfig class.

manifestPlaceholders

val manifestPlaceholdersMapProperty<StringString>

MapProperty of the variant'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.

Returns
MapProperty<StringString>

The MapProperty with keys as String.

namespace

val namespaceProvider<String>

The namespace of the generated R and BuildConfig classes. Also, the namespace used to resolve any relative class names that are declared in the AndroidManifest.xml.

proguardFiles

val proguardFilesListProperty<RegularFile>

List of proguard configuration files for this variant. The list is initialized from the corresponding DSL element, and cannot be queried at configuration time. At configuration time, you can only add new elements to the list.

signingConfig

val signingConfigSigningConfig?

Variant's signingConfig, initialized by the corresponding DSL element.

Returns
SigningConfig?

Variant's config or null if the variant is not configured for signing.