Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the documentation for Play sbt-plugin (Build.scala)?

I am currently using Play version 2.1.1, and trying to modify Build.scala.

By default, it imports a package called play.Project._

I have been trying to find out the API of this package so that I could customize our Build.scala file.

The only thing I have is this link: http://www.playframework.com/documentation/2.1.1/Build

I also tried to find it from here: http://www.playframework.com/documentation/api/2.1.1/scala/index.html#package

Could anyone point me the location of this API?

like image 374
Mingyu Avatar asked Oct 21 '22 09:10

Mingyu


1 Answers

The Build.scala uses a PlayProject as described in the Play SBT documentation. This PlayProject essentially is an sbt.Project, so you should have a closer look at the corresponding sbt API. The PlayProject itself is defined here (line 147):

lazy val PlayProject = PlayRuntimeProject("Play", "play")
  .settings(
    libraryDependencies := runtime,
    sourceGenerators in Compile <+= sourceManaged in Compile map PlayVersion,
    mappings in(Compile, packageSrc) <++= scalaTemplateSourceMappings,
    parallelExecution in Test := false,
    sourceGenerators in Compile <+= (dependencyClasspath in TemplatesCompilerProject in Runtime, packageBin in TemplatesCompilerProject in Compile, scalaSource in Compile, sourceManaged in Compile, streams) map ScalaTemplates
  ).dependsOn(SbtLinkProject, PlayExceptionsProject, TemplatesProject, IterateesProject, JsonProject)

The PlayRuntimeProject is defined in the same file.

like image 58
Fynn Avatar answered Oct 24 '22 04:10

Fynn