Class AndroidUnitTest

  • All Implemented Interfaces:
    com.android.build.gradle.internal.tasks.VariantAwareTask, java.lang.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  AndroidUnitTest.CreationAction  
      • 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
      AndroidUnitTest()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executeTests()  
      com.android.build.gradle.tasks.GenerateTestConfig.TestConfigInputs getTestConfigInputs()  
      java.lang.String getVariantName()  
      void setVariantName​(java.lang.String name)  
      • 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, getJavaVersion, getJvmArgs, getJvmArgumentProviders, getMaxHeapSize, getMaxParallelForks, getMinHeapSize, getModularity, getModuleRegistry, getNoMatchingTestErrorReasons, getObjectFactory, getOptions, getPatternSetFactory, getProcessBuilderFactory, 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, getBinResultsDir, getBuildOperationExecutor, getFileSystemOperations, getFilter, getHostnameLookup, getIgnoreFailures, getInstantiator, getListenerManager, getProgressLoggerFactory, getReports, getTestLogging, getTextOutputFactory, onOutput, removeTestListener, removeTestOutputListener, reports, reports, setBinResultsDir, 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, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
      • Methods inherited from class org.gradle.api.internal.AbstractTask

        appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getReasonNotToTrackState, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, 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
      • Methods inherited from interface com.android.build.gradle.internal.tasks.VariantAwareTask

        getAnalyticsService
    • Constructor Detail

      • AndroidUnitTest

        public AndroidUnitTest()
    • Method Detail

      • getVariantName

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

        public void setVariantName​(@NonNull
                                   java.lang.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()
      • executeTests

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