Table of Contents
| API Documentation: | TwirlSourceSet | 
|---|
Note: This class is incubating and may change in a future version of Gradle.
Represents a source set containing twirl templates
apply plugin: 'play' model { components { play { sources { withType(TwirlSourceSet) { // Use template format views.formats.csv.CsvFormat for all files named *.scala.csv // Additionally, include views.formats.csv._ package imports in generated sources. addUserTemplateFormat("csv", "views.formats.csv.CsvFormat", "views.formats.csv._") // Add these additional imports to all generated Scala code from Twirl templates additionalImports = [ 'my.pkg._', 'my.pkg.MyClass' ] } } } } }
| Property | Description | 
| additionalImports | Incubating The list of additional imports to add to the generated Scala code. | 
| defaultImports | Incubating The default imports that should be added to generated source files | 
| source | Incubating The source files. | 
| userTemplateFormats | Incubating The custom template formats configured for this source set. | 
| Method | Description | 
| addUserTemplateFormat(extension, templateType, imports) | Incubating Adds a custom template format. | 
Note: This property is incubating and may change in a future version of Gradle.
The list of additional imports to add to the generated Scala code.
TwirlImports defaultImports
Note: This property is incubating and may change in a future version of Gradle.
The default imports that should be added to generated source files
SourceDirectorySet source (read-only)
Note: This property is incubating and may change in a future version of Gradle.
The source files.
List<TwirlTemplateFormat>userTemplateFormats
List<TwirlTemplateFormat>Note: This property is incubating and may change in a future version of Gradle.
The custom template formats configured for this source set.
Note: This method is incubating and may change in a future version of Gradle.
Adds a custom template format.