DeviceTestBuilder

Added in 8.4.0

@Incubating
interface DeviceTestBuilder : GeneratesApkBuilder

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

Specifies host test code coverage data collection by configuring the JacocoPlugin.

Inherited properties

From com.android.build.api.variant.GeneratesApkBuilder
Boolean?

Sets whether multi-dex is enabled for this variant.

Int?

Sets the target SDK Version for this variant as an integer API level.

String?

Sets the target SDK Version for this variant as an integer API level.

Public properties

enable

Added in 8.4.0
var enableBoolean

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

enableCodeCoverage

Added in 8.6.1
Deprecated in 8.6.1
var enableCodeCoverageBoolean

Specifies host test code coverage data collection by configuring the JacocoPlugin.

When enabled, the Jacoco plugin is applied and coverage data is collected by the Jacoco plugin. This can avoid unwanted build time instrumentation required to collect coverage data from other test types such as unit tests.

If the value is initialized from the DSL com.android.build.api.dsl.BuildType.enableAndroidTestCoverage,