【问题标题】:How can I get a reference to current project in a sbt subproject build.sbt file如何在 sbt 子项目 build.sbt 文件中获取对当前项目的引用
【发布时间】:2017-07-26 02:33:39
【问题描述】:

我有一个 playframework 子项目。目前我将它定义为父build.sbt中的playframework模块@

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

我更愿意将这些知识委托给子项目 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)

【问题讨论】:

    标签: plugins playframework sbt


    【解决方案1】:

    您可以在子项目的build.sbt 文件中直接调用enablePlugins

    enablePlugins(PlayScala)
    

    【讨论】:

      猜你喜欢
      • 2016-09-19
      • 1970-01-01
      • 1970-01-01
      • 2017-12-27
      • 2017-04-07
      • 2013-10-02
      • 2015-02-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多