TestSuiteHostJarSpec

Added in 9.0.0-alpha12

@Incubating
interface TestSuiteHostJarSpec


Definition of host test sources for a test suite. Host test source files are compiled and therefore dependencies can be attached to them.

Summary

Public functions

Unit

Specifies dependency information for this test suite.

Public properties

AgpTestSuiteDependencies

Dependency handler for this sources

Boolean

If this property is set to true, the plugin performs resource, asset, and manifest merging before running your host tests.

Public functions

dependencies

Added in 9.0.0-alpha12
@Incubating
fun dependencies(action: AgpTestSuiteDependencies.() -> Unit): Unit

Specifies dependency information for this test suite.

Public properties

dependencies

Added in 9.0.0-alpha12
val dependenciesAgpTestSuiteDependencies

Dependency handler for this sources

enableAndroidResources

Added in 9.0.0-alpha12
var enableAndroidResourcesBoolean

If this property is set to true, the plugin performs resource, asset, and manifest merging before running your host tests. Your tests can then inspect a file called com/android/tools/test_config.properties on the classpath, which is a Java properties file with the following keys:

android_resource_apk: the path to the APK-like zip file containing merged resources, which includes all the resources from the current subproject and all its dependencies.

android_merged_assets: the path to the directory containing merged assets. The merged assets directory contains assets from the current subproject and it dependencies.

android_merged_manifest: the path to the merged manifest file. Only app subprojects have the manifest merged from their dependencies. Library subprojects do not include manifest components from their dependencies.

android_custom_package: the package name (namespace) of the final R class.

Note that the paths above are relative paths (relative to the current project directory, not the root project directory).