public class AndroidUnitTest
extends org.gradle.api.tasks.testing.Test
Test
that we need to use for local unit tests support.Modifier and Type | Class and Description |
---|---|
static class |
AndroidUnitTest.ConfigAction
Configuration Action for a JavaCompile task.
|
Constructor and Description |
---|
AndroidUnitTest() |
Modifier and Type | Method and Description |
---|---|
org.gradle.api.file.FileTree |
getCandidateClassFiles()
Returns the test class files.
|
addTestListener, addTestOutputListener, afterSuite, afterTest, beforeSuite, beforeTest, bootstrapClasspath, copyTo, copyTo, environment, environment, exclude, exclude, exclude, exclude, executable, executeTests, filter, getActorFactory, getAllJvmArgs, getBinResultsDir, getBootstrapClasspath, getBuildOperationProcessor, getClassLoaderCache, getClasspath, getDebug, getDefaultCharacterEncoding, getEnableAssertions, getEnvironment, getExcludes, getExecutable, getFileResolver, getFilter, getForkEvery, getIgnoreFailures, getIncludes, getInetAddressFactory, getInstantiator, getJavaVersion, getJvmArgs, getListenerManager, getMaxHeapSize, getMaxParallelForks, getMinHeapSize, getModuleRegistry, getOptions, getProcessBuilderFactory, getProgressLoggerFactory, getReports, getSystemProperties, getTestClassesDir, getTestFramework, getTestLogging, getTextOutputFactory, getWorkingDir, include, include, include, include, isScanForTestClasses, jvmArgs, jvmArgs, onOutput, options, removeTestListener, removeTestOutputListener, reports, reports, setAllJvmArgs, setBinResultsDir, setBootstrapClasspath, setClasspath, setDebug, setDefaultCharacterEncoding, setEnableAssertions, setEnvironment, setExcludes, setExecutable, setForkEvery, setIgnoreFailures, setIncludes, setJvmArgs, setMaxHeapSize, setMaxParallelForks, setMinHeapSize, setScanForTestClasses, setSystemProperties, setTestClassesDir, setTestNameIncludePatterns, setWorkingDir, systemProperties, systemProperty, testFramework, testLogging, useJUnit, useJUnit, useTestNG, useTestNG, workingDir
conventionMapping, conventionMapping, getConventionMapping
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActionClassLoaders, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString
public org.gradle.api.file.FileTree getCandidateClassFiles()
This is the special case we need to handle - if getCandidateClassFiles is called too early, i.e. before the task is fully configured, return an empty FileTree. The default is to create a FileTree using getTestClassesDir(), but that creates a FileTree with a null root, which fails later on.
getCandidateClassFiles
in class org.gradle.api.tasks.testing.Test
AndroidUnitTest.ConfigAction.configureSources(AndroidUnitTest)