Package org.gradle.plugins.ide.api
Class GeneratorTask<T>
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.plugins.ide.api.GeneratorTask<T>
- Type Parameters:
T
- The domain object for the configuration file.
- All Implemented Interfaces:
Comparable<Task>
,org.gradle.api.internal.DynamicObjectAware
,org.gradle.api.internal.IConventionAware
,org.gradle.api.internal.TaskInternal
,ExtensionAware
,Task
,org.gradle.util.Configurable<Task>
- Direct Known Subclasses:
GenerateSolutionFileTask
,PropertiesGeneratorTask
,PropertyListGeneratorTask
,XmlGeneratorTask
public class GeneratorTask<T>
extends org.gradle.api.internal.ConventionTask
A GeneratorTask
generates a configuration file based on a domain object of type T.
When executed the task:
- loads the object from the input file, if it exists.
- Calls the beforeConfigured actions, passing the object to each action.
- Configures the object in some task-specific way.
- Calls the afterConfigured actions, passing the object to each action.
- writes the object to the output file.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
Task.Namer
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.gradle.internal.MutableActionSet<T>
protected final org.gradle.internal.MutableActionSet<T>
protected T
protected org.gradle.plugins.ide.internal.generator.generator.Generator<T>
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe input file to load the initial configuration from.protected File
protected org.gradle.internal.reflect.Instantiator
The output file to write the final configuration to.void
setInputFile
(File inputFile) Sets the input file to load the initial configuration from.void
setOutputFile
(File outputFile) Sets the output file to write the final configuration to.Methods inherited from class org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMapping
Methods inherited from class org.gradle.api.DefaultTask
newInputDirectory, newInputFile, newOutputDirectory, newOutputFile
Methods inherited from class org.gradle.api.internal.AbstractTask
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doFirst, doLast, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, 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
-
Field Details
-
beforeConfigured
-
afterConfigured
-
generator
-
domainObject
-
-
Constructor Details
-
GeneratorTask
public GeneratorTask()
-
-
Method Details
-
getInstantiator
@Inject protected org.gradle.internal.reflect.Instantiator getInstantiator() -
getInputFile
The input file to load the initial configuration from. Defaults to the output file. If the specified input file does not exist, this task uses some default initial configuration.- Returns:
- The input file.
-
getInputFileIfExists
-
setInputFile
Sets the input file to load the initial configuration from.- Parameters:
inputFile
- The input file. Use null to use the output file.
-
getOutputFile
The output file to write the final configuration to.- Returns:
- The output file.
-
setOutputFile
Sets the output file to write the final configuration to.- Parameters:
outputFile
- The output file.
-