我目前正在使用Play版本2.1.1,并尝试修改Build.scala。
默认情况下,它会导入名为play.Project ._
的包我一直试图找出这个包的API,以便我可以自定义Build.scala文件。
我唯一拥有的是这个链接: http://www.playframework.com/documentation/2.1.1/Build
我也试过从这里找到它: http://www.playframework.com/documentation/api/2.1.1/scala/index.html#package
有人能指出这个API的位置吗?
答案 0 :(得分:3)
Build.scala
使用PlayProject
,如Play SBT documentation中所述。这个PlayProject
基本上是sbt.Project,因此您应该仔细查看corresponding sbt API。 PlayProject
本身定义为here(第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)
PlayRuntimeProject
在同一文件中定义。