api / org.gradle.play.tasks / RoutesCompile

RoutesCompile

@Incubating open class RoutesCompile : SourceTask

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 org.gradle.play.plugins.PlayPlugin plugin. Explicit configuration of this task is not expected and should be performed on the equivalent settings at the org.gradle.play.PlayApplicationSpec level.

Constructors

<init>

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 org.gradle.play.plugins.PlayPlugin plugin. Explicit configuration of this task is not expected and should be performed on the equivalent settings at the org.gradle.play.PlayApplicationSpec level.

Functions

getAdditionalImports

open fun getAdditionalImports(): MutableList<String>

Returns the additional imports of the Play Routes compiler.

getForkOptions

open fun getForkOptions(): BaseForkOptions

The fork options to be applied to the Routes compiler.

getInjectedRoutesGenerator

open fun getInjectedRoutesGenerator(): Boolean

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

getOutputDirectory

open fun getOutputDirectory(): File

Returns the directory to generate the parser source files into.

getToolChain

open fun getToolChain(): PlayToolChain

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

isGenerateReverseRoutes

open fun isGenerateReverseRoutes(): Boolean

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

isJavaProject

open fun isJavaProject(): Boolean

isNamespaceReverseRouter

open fun isNamespaceReverseRouter(): Boolean

Whether the reverse router should be namespaced.

setAdditionalImports

open fun setAdditionalImports(additionalImports: MutableList<String>): Unit

Specifies the additional imports of the Play Routes compiler.

setGenerateReverseRoutes

open fun setGenerateReverseRoutes(generateReverseRoutes: Boolean): Unit

Sets whether or not a reverse router should be generated.

setInjectedRoutesGenerator

open fun setInjectedRoutesGenerator(injectedRoutesGenerator: Boolean): Unit

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

setNamespaceReverseRouter

open fun setNamespaceReverseRouter(namespaceReverseRouter: Boolean): Unit

Sets whether or not the reverse router should be namespaced.

setOutputDirectory

open fun setOutputDirectory(outputDirectory: File): Unit

Specifies the directory to generate the parser source files into.

setPlatform

open fun setPlatform(platform: PlayPlatform): Unit

Inherited Functions

exclude

open fun exclude(vararg excludes: String): SourceTask
open fun exclude(excludes: MutableIterable<String>): SourceTask
open fun exclude(excludeSpec: Spec<FileTreeElement>): SourceTask
open fun exclude(excludeSpec: Closure<Any>): SourceTask

{@inheritDoc}

getExcludes

open fun getExcludes(): MutableSet<String>

{@inheritDoc}

getIncludes

open fun getIncludes(): MutableSet<String>

{@inheritDoc}

getSource

open fun getSource(): FileTree

Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.

include

open fun include(vararg includes: String): SourceTask
open fun include(includes: MutableIterable<String>): SourceTask
open fun include(includeSpec: Spec<FileTreeElement>): SourceTask
open fun include(includeSpec: Closure<Any>): SourceTask

{@inheritDoc}

setExcludes

open fun setExcludes(excludes: MutableIterable<String>): SourceTask

{@inheritDoc}

setIncludes

open fun setIncludes(includes: MutableIterable<String>): SourceTask

{@inheritDoc}

setSource

open fun setSource(source: FileTree): Unit

Sets the source for this task.

open fun setSource(source: Any): Unit

Sets the source for this task. The given source object is evaluated as per org.gradle.api.Project#files(Object...).

source

open fun source(vararg sources: Any): SourceTask

Adds some source to this task. The given source objects will be evaluated as per org.gradle.api.Project#files(Object...).