2017-03-06 60 views
0

我有一個playframework子項目。目前,我將其定義爲一個playframework模塊父build.sbt我怎樣才能得到一個sbt子項目中的當前項目的參考build.sbt文件

lazy val silhouetteModule = (project in file("modules/silhouette")) 
    .enablePlugins(PlayScala) 

我會preffer委託這些知識子項目build.sbt。我怎樣才能在這個enablePlugins子項目中調用?

import play.PlayScala 

scalaVersion := "2.11.1" 

name := "play-silhouette-seed" 

version := "1.0" 

libraryDependencies ++= Seq(
    "com.mohiva" %% "play-silhouette" % "1.0", 
    "org.webjars" %% "webjars-play" % "2.3.0", 
    "org.webjars" % "bootstrap" % "3.1.1", 
    "org.webjars" % "jquery" % "1.11.0", 
    "net.codingwell" %% "scala-guice" % "4.0.0-beta4", 
    cache 
) 

//this doesn't work 
currentThisProject.enablePlugins(PlayScala) 

回答

1

您可以在build.sbt文件直接調用enablePlugins的子項目:

enablePlugins(PlayScala) 
相關問題