|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gradle.api.internal.ConventionTask org.gradle.api.tasks.GeneratorTask
public class GeneratorTask extends ConventionTask
A GeneratorTask generates a configuration file based on a domain object of type T. When executed, the task:
- The domain object for the configuration file.Field Summary | |
---|---|
protected Generator |
generator
|
Constructor Summary | |
GeneratorTask()
|
Method Summary | |
---|---|
void
|
beforeConfigured(groovy.lang.Closure closure)
Adds a closure to be called before the domain object is configured by this task. |
void
|
beforeConfigured(Action action)
Adds an action to be called before the domain object is configured by this task. |
java.io.File
|
getInputFile()
The input file to load the initial configuration from. |
java.io.File
|
getOutputFile()
The output file to write the final configuration to. |
void
|
setInputFile(java.io.File inputFile)
Sets the input file to load the initial configuration from. |
void
|
setOutputFile(java.io.File outputFile)
Sets the output file to write the final configuration to. |
void
|
whenConfigured(groovy.lang.Closure closure)
Adds a closure to be called after the domain object has been configured by this task. |
void
|
whenConfigured(Action action)
Adds an action to be called after the domain object has been configured by this task. |
Field Detail |
---|
protected Generator generator
Constructor Detail |
---|
public GeneratorTask()
Method Detail |
---|
public void beforeConfigured(groovy.lang.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 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 java.io.File getInputFile()
@OutputFile public java.io.File getOutputFile()
public void setInputFile(java.io.File inputFile)
inputFile
- The input file. Use null to use the output file.
public void setOutputFile(java.io.File outputFile)
outputFile
- The output file.
public void whenConfigured(groovy.lang.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 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.
Groovy Documentation