Class AndroidUnitTest

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.testing.AbstractTestTask
org.gradle.api.tasks.testing.Test
com.android.build.gradle.tasks.factory.AndroidUnitTest
All Implemented Interfaces:
com.android.build.gradle.internal.tasks.VariantAwareTask, Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, org.gradle.api.plugins.ExtensionAware, org.gradle.api.reporting.Reporting<org.gradle.api.tasks.testing.TestTaskReports>, org.gradle.api.Task, org.gradle.api.tasks.util.PatternFilterable, org.gradle.api.tasks.VerificationTask, org.gradle.process.JavaForkOptions, org.gradle.process.ProcessForkOptions, org.gradle.util.Configurable<org.gradle.api.Task>

@CacheableTask public abstract class AndroidUnitTest extends org.gradle.api.tasks.testing.Test implements com.android.build.gradle.internal.tasks.VariantAwareTask
Patched version of Test that we need to use for local unit tests support.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface org.gradle.api.Task

    org.gradle.api.Task.Namer
  • Field Summary

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    abstract org.gradle.api.file.RegularFileProperty
     
    com.android.build.gradle.tasks.GenerateTestConfig.TestConfigInputs
     
     
    void
     

    Methods inherited from class org.gradle.api.tasks.testing.Test

    bootstrapClasspath, copyTo, copyTo, createTestExecuter, createTestExecutionSpec, debugOptions, environment, environment, exclude, exclude, exclude, exclude, executable, filter, getActorFactory, getAllJvmArgs, getBootstrapClasspath, getCandidateClassFiles, getClasspath, getDebug, getDebugOptions, getDefaultCharacterEncoding, getEnableAssertions, getEnvironment, getExcludes, getExecutable, getFailFast, getForkEvery, getForkOptionsFactory, getIncludes, getJavaLauncher, getJavaModuleDetector, getJavaToolchainService, getJavaVersion, getJvmArgs, getJvmArgumentProviders, getMaxHeapSize, getMaxParallelForks, getMinHeapSize, getModularity, getModuleRegistry, getNoMatchingTestErrorReasons, getObjectFactory, getOptions, getPatternSetFactory, getProcessBuilderFactory, getProviderFactory, getStableClasspath, getSystemProperties, getTestClassesDirs, getTestFramework, getTestFrameworkProperty, getWorkingDir, include, include, include, include, isScanForTestClasses, jvmArgs, jvmArgs, options, options, setAllJvmArgs, setAllJvmArgs, setBootstrapClasspath, setClasspath, setDebug, setDefaultCharacterEncoding, setEnableAssertions, setEnvironment, setExcludes, setExecutable, setExecutable, setFailFast, setForkEvery, setIncludes, setJvmArgs, setJvmArgs, setMaxHeapSize, setMaxParallelForks, setMinHeapSize, setScanForTestClasses, setSystemProperties, setTestClassesDirs, setTestNameIncludePatterns, setWorkingDir, setWorkingDir, systemProperties, systemProperty, testFramework, useJUnit, useJUnit, useJUnit, useJUnitPlatform, useJUnitPlatform, useTestNG, useTestNG, useTestNG, workingDir

    Methods inherited from class org.gradle.api.tasks.testing.AbstractTestTask

    addTestListener, addTestOutputListener, afterSuite, afterTest, beforeSuite, beforeTest, getBinaryResultsDirectory, getBuildOperationExecutor, getFileSystemOperations, getFilter, getHostnameLookup, getIgnoreFailures, getInstantiator, getListenerManager, getProgressLoggerFactory, getReports, getTestLogging, getTextOutputFactory, onOutput, removeTestListener, removeTestOutputListener, reports, reports, setIgnoreFailures, testLogging, testLogging

    Methods inherited from class org.gradle.api.internal.ConventionTask

    conventionMapping, conventionMapping, getConventionMapping

    Methods inherited from class org.gradle.api.DefaultTask

    compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService

    Methods inherited from class org.gradle.api.internal.AbstractTask

    appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, getConvention, notCompatibleWithConfigurationCache

    Methods inherited from interface com.android.build.gradle.internal.tasks.VariantAwareTask

    getAnalyticsService
  • Constructor Details

    • AndroidUnitTest

      public AndroidUnitTest()
  • Method Details

    • getVariantName

      @Internal @NonNull public String getVariantName()
      Specified by:
      getVariantName in interface com.android.build.gradle.internal.tasks.VariantAwareTask
    • setVariantName

      public void setVariantName(@NonNull String name)
      Specified by:
      setVariantName in interface com.android.build.gradle.internal.tasks.VariantAwareTask
    • getTestConfigInputs

      @Optional public com.android.build.gradle.tasks.GenerateTestConfig.TestConfigInputs getTestConfigInputs()
    • getJacocoCoverageOutputFile

      @OutputFile @Optional public abstract org.gradle.api.file.RegularFileProperty getJacocoCoverageOutputFile()
    • executeTests

      public void executeTests()
      Overrides:
      executeTests in class org.gradle.api.tasks.testing.Test