[英]Add an external Project dependency to my Play application
At the moment I am using a pretty basic build.sbt file which was created by activator and gives me a Play application 目前,我正在使用一个非常基本的build.sbt文件,该文件是由激活器创建的,并为我提供了Play应用程序
My goal is to add an external Project dependency to my Play application. 我的目标是向我的Play应用程序添加一个外部Project依赖项。
My build.sbt file looks along the lines of 我的build.sbt文件看起来像
libraryDependencies ++= Seq(
...
)
lazy val root = (project in file(".")).enablePlugins(PlayScala)
pipelineStages := Seq(rjs, digest, gzip)
Is the only way to add a dependency on an external project to change to using a build.scala file? 是添加对外部项目的依赖以更改为使用build.scala文件的唯一方法吗? If so, is it possible for the Build.scala file to reference the current build.sbt file? 如果是这样,Build.scala文件是否可以引用当前的build.sbt文件?
The external project also has its own Build.scala file, so is it possible to reference from the "master" Build file to the external projects? 外部项目也有自己的Build.scala文件,因此可以从“主” Build文件中引用外部项目吗?
Thanks 谢谢
You have two options: 您有两种选择:
Here's what option #2 looks like: 这是选项2的样子:
lazy val other = file("/path/to/other").getAbsoluteFile.toURI
lazy val root = (project in file(".")).enablePlugins(PlayScala).dependsOn(other)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.