Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 2.61 KB

play-routes.md

File metadata and controls

33 lines (21 loc) · 2.61 KB

play_routes

load("@rules_play_routes//play-routes:play-routes.bzl", "play_routes")

play_routes(name, srcs, generate_forwards_router, generate_reverse_router, include_play_imports,
            namespace_reverse_router, play_routes_toolchain_name, routes_generator, routes_imports)

Compiles Play routes files templates to Scala sources files.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
srcs Play routes files List of labels required
generate_forwards_router Whether the forward router should be generated. Setting to false may help generate only the reverse routes Boolean optional True
generate_reverse_router Whether the reverse router should be generated. Setting to false may reduce compile times if it's not needed. Boolean optional False
include_play_imports If true, include the imports the Play project includes by default. Boolean optional False
namespace_reverse_router Whether the reverse router should be namespaced. Useful if you have many routers that use the same actions. Boolean optional False
play_routes_toolchain_name The name of the Play Routes toolchain to use for this target String optional ""
routes_generator The full class of the routes generator, e.g., play.routes.compiler.InjectedRoutesGenerator String optional ""
routes_imports Additional imports to import to the Play routes List of strings optional []