DeviceTestBuilder

Added in 8.4.0

@Incubating
interface DeviceTestBuilder : GeneratesTestApkBuilder

Known direct subclasses

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

Summary

Constants

const String

Host test type for default unit tests.

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.

From com.android.build.api.variant.GeneratesTestApkBuilder
Boolean

Sets the Test APK debuggable flag.

Constants

ANDROID_TEST_TYPE

Added in 8.8.0-alpha09
@Incubating
const val ANDROID_TEST_TYPEString

Host test type for default unit tests.

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.8.0-alpha09
Deprecated in 8.8.0-alpha09
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,