Package org.gradle.language.twirl

## Interface TwirlSourceSet

- All Superinterfaces:
    `Buildable`, `BuildableComponentSpec`, `ComponentSpec`, `LanguageSourceSet`, `ModelElement`, `Named`

      @Incubating
      @Deprecated
      public interface TwirlSourceSet
      extends LanguageSourceSet

  Deprecated.
  Represents a source set containing twirl templates

           plugins {
               id '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' ]
                   }
                 }
               }
             }
           }

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Named

      `Named.Namer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addUserTemplateFormat​(java.lang.String extension, java.lang.String templateType, java.lang.String... imports)` | Deprecated. Adds a custom template format.
    `java.util.List<java.lang.String>` | `getAdditionalImports()` | Deprecated. Returns the list of additional imports to add to the generated Scala code.
    `TwirlImports` | `getDefaultImports()` | Deprecated. The default imports that should be added to generated source files
    `java.util.List<TwirlTemplateFormat>` | `getUserTemplateFormats()` | Deprecated. Returns the custom template formats configured for this source set.
    `void` | `setAdditionalImports​(java.util.List<java.lang.String> additionalImports)` | Deprecated. Sets the additional imports to add to all generated Scala code.
    `void` | `setDefaultImports​(TwirlImports defaultImports)` | Deprecated. Sets the default imports that should be added to generated source files to the given language
    `void` | `setUserTemplateFormats​(java.util.List<TwirlTemplateFormat> userTemplateFormats)` | Deprecated. Sets the custom template formats for this source set.

    - ### Methods inherited from interface org.gradle.api.Buildable

      `getBuildDependencies`

    - ### Methods inherited from interface org.gradle.api.BuildableComponentSpec

      `builtBy, getBuildTask, hasBuildDependencies, setBuildTask`

    - ### Methods inherited from interface org.gradle.platform.base.ComponentSpec

      `getProjectPath`

    - ### Methods inherited from interface org.gradle.language.base.LanguageSourceSet

      `generatedBy, getParentName, getSource`

    - ### Methods inherited from interface org.gradle.model.ModelElement

      `getDisplayName, getName`

- - ### Method Detail

    - #### getDefaultImports

          TwirlImports getDefaultImports()

      Deprecated.
      The default imports that should be added to generated source files

    - #### setDefaultImports

          void setDefaultImports​(TwirlImports defaultImports)

      Deprecated.
      Sets the default imports that should be added to generated source files to the given language

    - #### getUserTemplateFormats

          java.util.List<TwirlTemplateFormat> getUserTemplateFormats()

      Deprecated.
      Returns the custom template formats configured for this source set.
      Since:
        4.2

    - #### setUserTemplateFormats

          void setUserTemplateFormats​(java.util.List<TwirlTemplateFormat> userTemplateFormats)

      Deprecated.
      Sets the custom template formats for this source set.
      Since:
        4.2

    - #### addUserTemplateFormat

          void addUserTemplateFormat​(java.lang.String extension,
                                     java.lang.String templateType,
                                     java.lang.String... imports)

      Deprecated.
      Adds a custom template format.
      Parameters:
        `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.
      Since:
        4.2

    - #### getAdditionalImports

          java.util.List<java.lang.String> getAdditionalImports()

      Deprecated.
      Returns the list of additional imports to add to the generated Scala code.
      Since:
        4.2

    - #### setAdditionalImports

          void setAdditionalImports​(java.util.List<java.lang.String> additionalImports)

      Deprecated.
      Sets the additional imports to add to all generated Scala code.
      Parameters:
        `additionalImports` - additional imports
      Since:
        4.2