Class AbstractContinuousExec

  • All Implemented Interfaces:
    java.lang.Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>
    Direct Known Subclasses:
    ContinuousJavaExec

    public abstract class AbstractContinuousExec
    extends org.gradle.api.DefaultTask
    A continuous exec task extends the standard Exec task from gradle with the ability to react to changes in a continuous build. The task starts a process in the background. The process the communicates over a simple protocol via stdin and stdout. After finishing start up, the process must write the line "ok" (without quotes) to stdout. Whenever a change is detected in the task dependencies or watched files, a line consisting of the null-separated full paths of changed files is written to the process. The process should then respond with a line "ok" (without quotes). Subclasses specify how to spawn the process. See for example ContinuousJavaExec for spawning a java task.
    • Nested Class Summary

      • 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
      AbstractContinuousExec​(org.gradle.deployment.internal.DeploymentRegistry deploymentRegistry)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(org.gradle.work.InputChanges changes)  
      org.gradle.api.file.ConfigurableFileCollection getWatch()
      Configure the paths that are watched for changes.
      • 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, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, replaceLogger, 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

        getConvention
    • Constructor Detail

      • AbstractContinuousExec

        @Inject
        public AbstractContinuousExec​(org.gradle.deployment.internal.DeploymentRegistry deploymentRegistry)
    • Method Detail

      • execute

        public void execute​(org.gradle.work.InputChanges changes)
                     throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • getWatch

        @InputFiles
        @Incremental
        public org.gradle.api.file.ConfigurableFileCollection getWatch()
        Configure the paths that are watched for changes. Only paths that are contained in the file collection will be passed as "changed files" to the process. Directories in this collection are watched recursively.
        Returns:
        Collection of watched files and directories