DeviceTestBuilder

Added in 8.5.0-alpha07

@Incubating
interface DeviceTestBuilder

Known direct subclasses

Interface to turn tests on devices, AndroidTest being an example of device tests.

Summary

Public properties

Boolean

Set to true if the variant's has any device tests, false otherwise.

Boolean?

Sets whether multi-dex is enabled for this variant.

Public properties

enable

Added in 8.5.0-alpha07
var enableBoolean

Set to true if the variant's has any device tests, false otherwise. Value is Boolean#True by default.

enableMultiDex

Added in 8.5.0-alpha07
Deprecated in 8.5.0-alpha07
var enableMultiDexBoolean?

Sets whether multi-dex is enabled for this variant.

This can be null, in which case the default value is used.

It is not safe to read the value of this property as other plugins that were applied later can change this value so there is no guarantee you would get the final value. To get the final value, use the AndroidComponentsExtension.onVariants API :

onVariants { variant ->
variant.dexing.isMultiDexEnabled
}

Note the a RuntimeException will be thrown at Runtime if a java or groovy code tries to read the property value.