PatternFilterable@Incubating public class TwirlCompile extends SourceTask
Task.NamersourceTASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE| Constructor | Description |
|---|---|
TwirlCompile() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addUserTemplateFormat(java.lang.String extension,
java.lang.String templateType,
java.lang.String... imports) |
Adds a custom template format.
|
java.util.List<java.lang.String> |
getAdditionalImports() |
Returns the list of additional imports to add to the generated Scala code.
|
TwirlImports |
getDefaultImports() |
Returns the default imports that will be used when compiling templates.
|
java.lang.Object |
getDependencyNotation() |
|
BaseForkOptions |
getForkOptions() |
fork options for the twirl compiler.
|
java.io.File |
getOutputDirectory() |
Returns the directory to generate the parser source files into.
|
PlayToolChain |
getToolChain() |
Returns the tool chain that will be used to compile the twirl source.
|
java.util.List<TwirlTemplateFormat> |
getUserTemplateFormats() |
Returns the custom template formats configured for this task.
|
void |
setAdditionalImports(java.util.List<java.lang.String> additionalImports) |
Sets the additional imports to add to all generated Scala code.
|
void |
setDefaultImports(TwirlImports defaultImports) |
Sets the default imports to be used when compiling templates.
|
void |
setOutputDirectory(java.io.File outputDirectory) |
Specifies the directory to generate the parser source files into.
|
void |
setPlatform(PlayPlatform platform) |
|
void |
setToolChain(PlayToolChain toolChain) |
Sets the tool chain that will be used to compile the twirl source.
|
void |
setUserTemplateFormats(java.util.List<TwirlTemplateFormat> userTemplateFormats) |
Sets the custom template formats for this task.
|
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, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toStringconventionMapping, conventionMapping, getConventionMappingnewInputDirectory, newInputFile, newOutputDirectory, newOutputFileclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSetFactory, getSource, include, include, include, include, setExcludes, setIncludes, setSource, setSource, sourcepublic BaseForkOptions getForkOptions()
@OutputDirectory public java.io.File getOutputDirectory()
@Input public java.lang.Object getDependencyNotation()
public void setOutputDirectory(java.io.File outputDirectory)
outputDirectory - The output directory. Must not be null.@Nullable @Optional @Input public TwirlImports getDefaultImports()
public void setDefaultImports(@Nullable
TwirlImports defaultImports)
defaultImports - The imports to be used.public void setPlatform(PlayPlatform platform)
@Inject public PlayToolChain getToolChain()
public void setToolChain(PlayToolChain toolChain)
toolChain - The tool chain.@Input public java.util.List<TwirlTemplateFormat> getUserTemplateFormats()
public void setUserTemplateFormats(java.util.List<TwirlTemplateFormat> userTemplateFormats)
public void addUserTemplateFormat(java.lang.String extension,
java.lang.String templateType,
java.lang.String... imports)
extension - file extension this template applies to (e.g., html).templateType - fully-qualified type for this template format.imports - additional imports to add for the custom template format.@Input public java.util.List<java.lang.String> getAdditionalImports()
public void setAdditionalImports(java.util.List<java.lang.String> additionalImports)
additionalImports - additional imports