|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gradle.api.internal.AbstractTask org.gradle.api.DefaultTask org.gradle.api.internal.ConventionTask org.gradle.api.tasks.GeneratorTask<T>
T
- The domain object for the configuration file.public class GeneratorTask<T>
A GeneratorTask
generates a configuration file based on a domain object of type T. When executed, the
task:
Field Summary | |
---|---|
protected org.gradle.api.internal.tasks.generator.Generator<T> |
generator
|
Fields inherited from interface org.gradle.api.Task |
---|
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_NAME, TASK_OVERWRITE, TASK_TYPE |
Constructor Summary | |
---|---|
GeneratorTask()
|
Method Summary | |
---|---|
void |
beforeConfigured(Action<? super T> action)
Adds an action to be called before the domain object is configured by this task. |
void |
beforeConfigured(Closure closure)
Adds a closure to be called before the domain object is configured by this task. |
File |
getInputFile()
The input file to load the initial configuration from. |
File |
getOutputFile()
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. |
void |
whenConfigured(Action<? super T> action)
Adds an action to be called after the domain object has been configured by this task. |
void |
whenConfigured(Closure closure)
Adds a closure to be called after the domain object has been configured by this task. |
Methods inherited from class org.gradle.api.internal.ConventionTask |
---|
conventionMapping, getConventionMapping, setConventionMapping |
Methods inherited from class org.gradle.api.internal.AbstractTask |
---|
captureStandardOutput, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doFirst, doLast, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuter, getGroup, getInputs, getLogger, getLogging, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getStandardOutputCapture, getState, getTaskDependencies, getTemporaryDir, hashCode, hasProperty, injectIntoNewInstance, isEnabled, leftShift, onlyIf, onlyIf, property, setActions, setConvention, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setGroup, setName, setOnlyIf, setOnlyIf, setProject, setProperty, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected org.gradle.api.internal.tasks.generator.Generator<T> generator
Constructor Detail |
---|
public GeneratorTask()
Method Detail |
---|
public File getInputFile()
public void setInputFile(File inputFile)
inputFile
- The input file. Use null to use the output file.public File getOutputFile()
public void setOutputFile(File outputFile)
outputFile
- The output file.public void beforeConfigured(Closure closure)
Adds a closure to be called before the domain object is configured by this task. The domain object is passed as a parameter to the closure.
The closure is executed after the domain object has been loaded from the input file. Using this method allows you to change the domain object in some way before the task configures it.
closure
- The closure to execute.public void beforeConfigured(Action<? super T> action)
Adds an action to be called before the domain object is configured by this task. The domain object is passed as a parameter to the action.
The action is executed after the domain object has been loaded from the input file. Using this method allows you to change the domain object in some way before the task configures it.
action
- The action to execute.public void whenConfigured(Closure closure)
Adds a closure to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the closure.
The closure is executed just before the domain object is written to the output file. Using this method allows you to override the configuration applied by this task.
closure
- The closure to execute.public void whenConfigured(Action<? super T> action)
Adds an action to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the action.
The action is executed just before the domain object is written to the output file. Using this method allows you to override the configuration applied by this task.
action
- The action to execute.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |