Android 12 Developer Preview is here! Try it out, and give us your feedback!

AndroidTest

@Incubating interface AndroidTest : TestComponent
com.android.build.api.component.AndroidTest

Properties for the android test Variant of a module.

Summary

Inherited functions

Properties

abstract AndroidResources

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

abstract Property<String>

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

abstract MapProperty<String, out BuildConfigField<out Serializable>>

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

abstract Property<Boolean>

The functionalTest value to use to run the tests.

abstract Property<Boolean>

The handleProfiling value to use to run the tests.

abstract Property<String>

The instrumentationRunner to use to run the tests.

abstract MapProperty<String, String>

MapProperty of the variant's manifest placeholders.

abstract Provider<String>

The namespace of the generated R and BuildConfig classes.

abstract ApkPackaging

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

abstract ListProperty<RegularFile>

List of proguard configuration files for this variant.

abstract Renderscript?

Variant specific settings for the renderscript compiler.

abstract MapProperty<ResValue.Key, ResValue>

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

abstract SigningConfig?

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

abstract Property<String?>

The test label.

Inherited properties

Properties

androidResources

abstract val androidResources: AndroidResources

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

applicationId

abstract val applicationId: Property<String>

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

buildConfigFields

abstract val buildConfigFields: MapProperty<String, out BuildConfigField<out Serializable>>

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

functionalTest

abstract val functionalTest: Property<Boolean>

The functionalTest value to use to run the tests.

handleProfiling

abstract val handleProfiling: Property<Boolean>

The handleProfiling value to use to run the tests.

instrumentationRunner

abstract val instrumentationRunner: Property<String>

The instrumentationRunner to use to run the tests.

manifestPlaceholders

abstract val manifestPlaceholders: MapProperty<String, String>

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.

Return
The MapProperty with keys as String.

namespace

abstract val namespace: Provider<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.

This value supersedes any value specified by the package attribute in the source AndroidManifest.xml, but doing a 'get' on this property will not retrieve the value specified in the AndroidManifest.xml.

packaging

abstract val packaging: ApkPackaging

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

proguardFiles

abstract val proguardFiles: ListProperty<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.

renderscript

abstract val renderscript: Renderscript?

Variant specific settings for the renderscript compiler. This will return null when com.android.build.api.dsl.BuildFeatures.renderScript is false.

resValues

abstract val resValues: MapProperty<ResValue.Key, ResValue>

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

signingConfig

abstract val signingConfig: SigningConfig?

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

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

testLabel

abstract val testLabel: Property<String?>

The test label.