Package: org.gradle.play.tasks

## [Java] Class RoutesCompile

- org.gradle.play.tasks.RoutesCompile

- Task for compiling routes templates into Scala code.

  This task is usually created as one of the build tasks when building a Play application with the PlayPlugin plugin. Explicit configuration of this task is not expected and should be performed on the equivalent settings at the PlayApplicationSpec level.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class SourceTask` | `source`
    `class org.gradle.api.internal.ConventionTask` | `TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `List<String>` | `getAdditionalImports()` Returns the additional imports of the Play Routes compiler.
    `BaseForkOptions` | `getForkOptions()` The fork options to be applied to the Routes compiler.
    `boolean` | `getInjectedRoutesGenerator()` Is the injected routes generator (`play.routes.compiler.InjectedRoutesGenerator`) used for generating routes?
    `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 routes source.
    `boolean` | `isGenerateReverseRoutes()` Whether a reverse router should be generated.
    `boolean` | `isJavaProject()`
    `boolean` | `isNamespaceReverseRouter()` Whether the reverse router should be namespaced.
    `void` | `setAdditionalImports(List<String> additionalImports)` Specifies the additional imports of the Play Routes compiler.
    `void` | `setGenerateReverseRoutes(boolean generateReverseRoutes)` Sets whether or not a reverse router should be generated.
    `void` | `setInjectedRoutesGenerator(boolean injectedRoutesGenerator)` Configure if the injected routes generator should be used to generate routes.
    `void` | `setNamespaceReverseRouter(boolean namespaceReverseRouter)` Sets whether or not the reverse router should be namespaced.
    `void` | `setOutputDirectory(File outputDirectory)` Specifies the directory to generate the parser source files into.
    `void` | `setPlatform(PlayPlatform platform)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class SourceTask` | `exclude, exclude, exclude, exclude, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source`
    `class org.gradle.api.internal.ConventionTask` | `org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, groovy.lang.Closure), org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#getConventionMapping(), org.gradle.api.internal.ConventionTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.ConventionTask#toString(), org.gradle.api.internal.ConventionTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.ConventionTask#compareTo(java.lang.Object), org.gradle.api.internal.ConventionTask#getName(), org.gradle.api.internal.ConventionTask#getActions(), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#setName(java.lang.String), org.gradle.api.internal.ConventionTask#getPath(), org.gradle.api.internal.ConventionTask#getExtensions(), org.gradle.api.internal.ConventionTask#getLogger(), org.gradle.api.internal.ConventionTask#execute(), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#getDescription(), org.gradle.api.internal.ConventionTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#isEnabled(), org.gradle.api.internal.ConventionTask#property(java.lang.String), org.gradle.api.internal.ConventionTask#setEnabled(boolean), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getShouldRunAfter(), org.gradle.api.internal.ConventionTask#getProject(), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#setActions(java.util.List), org.gradle.api.internal.ConventionTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setDidWork(boolean), org.gradle.api.internal.ConventionTask#getDidWork(), org.gradle.api.internal.ConventionTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doLast(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doLast(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#deleteAllActions(), org.gradle.api.internal.ConventionTask#getEnabled(), org.gradle.api.internal.ConventionTask#getAnt(), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#hasProperty(java.lang.String), org.gradle.api.internal.ConventionTask#getConvention(), org.gradle.api.internal.ConventionTask#setDescription(java.lang.String), org.gradle.api.internal.ConventionTask#getGroup(), org.gradle.api.internal.ConventionTask#setGroup(java.lang.String), org.gradle.api.internal.ConventionTask#dependsOnTaskDidWork(), org.gradle.api.internal.ConventionTask#getInputs(), org.gradle.api.internal.ConventionTask#getTemporaryDir(), org.gradle.api.internal.ConventionTask#mustRunAfter([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setMustRunAfter(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getMustRunAfter(), org.gradle.api.internal.ConventionTask#finalizedBy([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setFinalizedBy(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getFinalizedBy(), org.gradle.api.internal.ConventionTask#shouldRunAfter([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setShouldRunAfter(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getDependsOn(), org.gradle.api.internal.ConventionTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.ConventionTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#getStandardOutputCapture(), org.gradle.api.internal.ConventionTask#getAsDynamicObject(), org.gradle.api.internal.ConventionTask#setProject(org.gradle.api.Project), org.gradle.api.internal.ConventionTask#prependParallelSafeAction(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#getTaskActions(), org.gradle.api.internal.ConventionTask#getOnlyIf(), org.gradle.api.internal.ConventionTask#getImpliesSubProjects(), org.gradle.api.internal.ConventionTask#setImpliesSubProjects(boolean), org.gradle.api.internal.ConventionTask#getExecuter(), org.gradle.api.internal.ConventionTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.ConventionTask#getTemporaryDirFactory(), org.gradle.api.internal.ConventionTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.ConventionTask#getValidators(), org.gradle.api.internal.ConventionTask#appendParallelSafeAction(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#isHasCustomActions(), org.gradle.api.internal.ConventionTask#wait(long, int), org.gradle.api.internal.ConventionTask#wait(long), org.gradle.api.internal.ConventionTask#wait(), org.gradle.api.internal.ConventionTask#equals(java.lang.Object), org.gradle.api.internal.ConventionTask#hashCode(), org.gradle.api.internal.ConventionTask#getClass(), org.gradle.api.internal.ConventionTask#notify(), org.gradle.api.internal.ConventionTask#notifyAll()`

- - ### Method Detail

    - #### @Input public List<String> getAdditionalImports()

      Returns the additional imports of the Play Routes compiler.

      Returns:
        The additional imports.

    - #### public BaseForkOptions getForkOptions()

      The fork options to be applied to the Routes compiler.

      Returns:
        The fork options for the Routes compiler.

    - #### @Input public boolean getInjectedRoutesGenerator()

      Is the injected routes generator (`play.routes.compiler.InjectedRoutesGenerator`) used for generating routes? Default is false.

      Returns:
        false if StaticRoutesGenerator will be used to generate routes, true if InjectedRoutesGenerator will be used to generate routes.

    - #### @OutputDirectory public File getOutputDirectory()

      Returns the directory to generate the parser source files into.

      Returns:
        The output directory.

    - #### @Incubating @javax.inject.Inject public PlayToolChain getToolChain()

      Returns the tool chain that will be used to compile the routes source.

      Returns:
        The tool chain.

    - #### @Input public boolean isGenerateReverseRoutes()

      Whether a reverse router should be generated. Default is true.

    - #### public boolean isJavaProject()

    - #### @Input public boolean isNamespaceReverseRouter()

      Whether the reverse router should be namespaced.

    - #### public void setAdditionalImports(List<String> additionalImports)

      Specifies the additional imports of the Play Routes compiler.

    - #### public void setGenerateReverseRoutes(boolean generateReverseRoutes)

      Sets whether or not a reverse router should be generated.

    - #### public void setInjectedRoutesGenerator(boolean injectedRoutesGenerator)

      Configure if the injected routes generator should be used to generate routes.

      Parameters:
        `injectedRoutesGenerator` - false - use StaticRoutesGenerator true - use InjectedRoutesGenerator

    - #### public void setNamespaceReverseRouter(boolean namespaceReverseRouter)

      Sets whether or not the reverse router should be namespaced.

    - #### public void setOutputDirectory(File outputDirectory)

      Specifies the directory to generate the parser source files into.

      Parameters:
        `outputDirectory` - The output directory. Must not be null.

    - #### public void setPlatform(PlayPlatform platform)