abstract class AbstractCopyTask : ConventionTask, CopySpec, CopySpecSource
|
|
abstract class AbstractExecTask<T : AbstractExecTask<AbstractExecTask<*>>> : ConventionTask, ExecSpec
|
|
interface AntBuilderAware
An |
|
interface ClasspathNormalizer : FileNormalizer
Normalizes file input that represents a Java runtime classpath. Compared to the default behavior this normalizer keeps the order of any root files, but ignores the order and timestamps of files in directories and ZIP/JAR files. |
|
interface CompatibilityAdapterForTaskInputs
Helper interface for binary compatibility with Gradle 2.x version of the TaskInputs interface. |
|
interface CompatibilityAdapterForTaskOutputs
Helper interface for binary compatibility with Gradle 2.x version of the TaskOutputs interface. |
|
interface CompileClasspathNormalizer : FileNormalizer
Normalizes file input that represents a Java compile classpath. Compared to the default behavior this normalizer keeps the order of any root files, but ignores the order and timestamps of files in directories and ZIP/JAR files. Compared to ClasspathNormalizer this normalizer only snapshots the ABIs of class files, and ignores any non-class resource. |
|
open class Copy : AbstractCopyTask
Copies files into a destination directory. This task can also rename and filter files as it copies. The task implements org.gradle.api.file.CopySpec for specifying what to copy. Examples:
|
|
open class Delete : ConventionTask, DeleteSpec
Deletes files or directories. Example: Be default symlinks will not be followed when deleting files. To change this behavior call Delete#setFollowSymlinks(boolean) with true. On systems that do not support symlinks, this will have no effect.
|
|
open class Exec : AbstractExecTask<AbstractExecTask<*>>
Executes a command line process. Example:
|
|
interface FileNormalizer
A normalizer used to remove unwanted noise when considering file inputs. The default behavior without specifying a normalizer is to ignore the order of the files. |
|
open class GradleBuild : ConventionTask
Executes a Gradle build. |
|
open class GroovyRuntime
Provides information related to the Groovy runtime(s) used in a project. Added by the org.gradle.api.plugins.GroovyBasePlugin as a project extension named Example usage:
|
|
interface GroovySourceSet
A |
|
open class JavaExec : ConventionTask, JavaExecSpec
Executes a Java application in a child process. Similar to org.gradle.api.tasks.Exec, but starts a JVM with the given classpath and application class.
The process can be started in debug mode (see
|
|
class PathSensitivity
Enumeration of different path handling strategies for task properties. |
|
open class ScalaRuntime
Provides information related to the Scala runtime(s) used in a project. Added by the Example usage:
|
|
interface ScalaSourceSet
A |
|
interface SourceSet
A See the example below how SourceSet 'main' is accessed and how the SourceDirectorySet 'java' is configured to exclude some package from compilation.
|
|
interface SourceSetContainer : NamedDomainObjectContainer<SourceSet>, NamedDomainObjectSet<SourceSet>
A |
|
interface SourceSetOutput : FileCollection
A collection of all output directories (compiled classes, processed resources, etc.) - notice that SourceSetOutput extends FileCollection. Provides output information of the source set. Allows configuring the default output dirs and specify additional output dirs. Working with generated resources.
In general, we recommend generating resources into folders different than the regular resourcesDir and classesDir. Usually, it makes the build easier to understand and maintain. Also it gives some additional benefits because other Gradle plugins can take advantage of the output dirs 'registered' in the SourceSet.output. For example: Java plugin will use those dirs in calculating class paths and for jarring the content; IDEA and Eclipse plugins will put those folders on relevant classpath. An example how to work with generated resources: Find more information in #dir(java.util.Map, Object) and #getDirs()
|
|
open class SourceTask : ConventionTask, PatternFilterable
A |
|
open class Sync : AbstractCopyTask
Synchronizes the contents of a destination directory with some source directories and files. This task is like the Copy task, except the destination directory will only contain the files copied. All files that exist in the destination directory will be deleted before copying files, unless a Examples:
|
|
interface TaskCollection<T : Task> : NamedDomainObjectSet<T>
A |
|
interface TaskContainer : TaskCollection<Task>, PolymorphicDomainObjectContainer<Task>
A You can obtain a |
|
interface TaskDependency
A You can add a |
|
interface TaskDestroyables
Represents the files or directories that a org.gradle.api.Task destroys (removes). |
|
interface TaskFilePropertyBuilder : TaskPropertyBuilder
Describes a property of a task that contains zero or more files. |
|
interface TaskInputFilePropertyBuilder : TaskFilePropertyBuilder, TaskInputs
Describes an input property of a task that contains zero or more files. |
|
interface TaskInputPropertyBuilder : TaskPropertyBuilder, TaskInputs
Describes an input property of a task. |
|
interface TaskInputs : CompatibilityAdapterForTaskInputs
A You can obtain a |
|
interface TaskLocalState
Represents the files or directories that represent the local state of a org.gradle.api.Task. The typical usage for local state is to store non-relocatable incremental analysis between builds. Local state is removed whenever the task is loaded from cache. |
|
interface TaskOutputFilePropertyBuilder : TaskFilePropertyBuilder, TaskOutputs
Describes an output property of a task that contains zero or more files. |
|
interface TaskOutputs : CompatibilityAdapterForTaskOutputs
A You can obtain a |
|
interface TaskPropertyBuilder
Describes a property of a task. |
|
interface TaskProvider<T : Task> : Provider<T>
Providers a task of the given type. |
|
interface TaskReference : Named
A lightweight reference to a task. |
|
interface TaskState
|
|
open class TaskValidationException : DefaultMultiCauseException
A |
|
open class Upload : ConventionTask
Uploads the artifacts of a Configuration to a set of repositories. |
|
interface VerificationTask
A |
|
interface WorkResult
Provides information about some work which was performed. |
|
open class WorkResults
Helps access trivial WorkResult objects. |
|
open class WriteProperties : DefaultTask
Writes a java.util.Properties in a way that the results can be expected to be reproducible. There are a number of differences compared to how properties are stored:
Like with java.util.Properties, Unicode characters are escaped when using the default Latin-1 (ISO-8559-1) encoding. |
class CacheableTask
Attached to a task type to indicate that task output caching should be enabled by default for tasks of this type. Only tasks that produce reproducible and relocatable output should be marked with Caching for individual task instances can be disabled via |
|
class Classpath
Marks a property as specifying a JVM classpath for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. Note: to stay compatible with versions prior to Gradle 3.2, classpath properties need to be annotated with @InputFiles as well. |
|
class CompileClasspath
Marks a property as specifying a Java compile classpath for a task. Attaching this annotation to a property means that changes that do not affect the API of the classes in classpath will be ignored. The following kinds of changes to the classpath will be ignored:
This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. Note: to stay compatible with versions prior to Gradle 3.4, classpath properties need to be annotated with @InputFiles as well. |
|
class Console
Attached to a task property to indicate that the property is not to be taken into account for up-to-date checking, because its value only influences the console output of the task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task not to be considered out-of-date when the property has changed. |
|
class Destroys
Marks a property as specifying a file or directory that a task destroys. This annotation should be attached to the getter method or the field for the property. This will cause the task to have exclusive access to this file or directory while running. This means that other tasks that either create or consume this file (by specifying the file or directory as an input or output) cannot execute concurrently with a task that destroys this file. |
|
class Input
Attached to a task property to indicate that the property specifies some input value for the task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task to be considered out-of-date when the property has changed. When used on a java.io.File object that refers to a file or directory, the up-to-date check is only dependent on the path and not the contents of the file or directory. To make it depend on the contents, use org.gradle.api.tasks.InputFile or org.gradle.api.tasks.InputDirectory respectively. |
|
class InputDirectory
Marks a property as specifying an input directory for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task to be considered out-of-date when the directory location or contents have changed. To make the task dependent on the directory location but not the contents, use an org.gradle.api.tasks.Input annotation instead. |
|
class InputFile
Marks a property as specifying an input file for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task to be considered out-of-date when the file path or contents have changed. To make the up-to-date check only dependent on the path and not the contents of the file or directory, annotate it instead with org.gradle.api.tasks.Input. |
|
class InputFiles
Marks a property as specifying the input files for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task to be considered out-of-date when the file paths or contents have changed. Also see org.gradle.api.tasks.InputDirectory. |
|
class Internal
Attached to a task property to indicate that the property is not to be taken into account for up-to-date checking. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task not to be considered out-of-date when the property has changed. |
|
class LocalState
Marks a property as specifying local state for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. Local state is removed when the task is loaded from cache. |
|
class Nested
Marks a property as specifying a nested bean, whose properties should be checked for annotations. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. The implementation of the nested bean is tracked as an input, too. This allows tracking behavior such as org.gradle.api.Actions as task inputs. This annotations supports org.gradle.api.provider.Provider values by treating the result of This annotation supports Iterable values by treating each element as a separate nested bean. As a property name, the index of the element in the iterable prefixed by This annotation supports $java.util.Map values by treating each value of the map as a separate nested bean. The keys of the map are used as property names. |
|
class Optional
Marks a task property as optional. This means that a value does not have to be specified for the property, but any value specified must meet the validation constraints for the property. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.
|
|
class OutputDirectories
Marks a property as specifying one or more output directories for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task to be considered out-of-date when the directory paths or task output to those directories have been modified since the task was last run. When the annotated property is a java.util.Map, then each output directory will be associated with an identity. For cacheable tasks this is a requirement. The keys of the map must be non-empty strings. The values of the map will be evaluated to individual directories as per Otherwise the given directories will be evaluated as per |
|
class OutputDirectory
Marks a property as specifying an output directory for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task to be considered out-of-date when the directory path or task output to that directory has been modified since the task was last run. |
|
class OutputFile
Marks a property as specifying an output file for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task to be considered out-of-date when the file path or contents are different to when the task was last run. |
|
class OutputFiles
Marks a property as specifying one or more output files for a task. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. This will cause the task to be considered out-of-date when the file paths or contents are different to when the task was last run. When the annotated property is a java.util.Map, then each output file will be associated with an identity. For cacheable tasks this is a requirement. The keys of the map must be non-empty strings. The values of the map will be evaluated to individual files as per Otherwise the given files will be evaluated as per |
|
class PathSensitive
Annotates a task file property, specifying which part of the file paths should be considered during up-to-date checks. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored. |
|
class SkipWhenEmpty
Attached to a task property to indicate that the task should be skipped when the value of the property is an empty org.gradle.api.file.FileCollection or directory. If all of the inputs declared with this annotation are empty, the task will be skipped with a "NO-SOURCE" message. This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.
|
|
class TaskAction
Marks a method as the action to run when the task is executed. |
open class StopActionException : GradleException
A
If the Note that throwing this exception does not fail the execution of the task or the build. |
|
open class StopExecutionException : RuntimeException
A Note that throwing this exception does not fail the execution of the task or the build. |
|
open class TaskExecutionException : GradleException
A |
|
open class TaskInstantiationException : GradleException
A |