-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
43 lines (36 loc) · 1.46 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import CommandScalaPlay.buildAll
import BuildEnvPlugin.autoImport.{BuildEnv, buildEnv}
lazy val commonSettings = Seq(
name:= """scalaplay""",
organization := "com.mojitoverde",
version := "1.0",
scalaVersion := "2.11.7"
)
lazy val root = (project in file(".")).enablePlugins(PlayScala). settings(commonSettings,
resourceDirectory in Compile := baseDirectory.value / "conf",
commands ++= Seq(buildAll)).dependsOn(restfulapi,util).aggregate(restfulapi,util)
enablePlugins(UniversalPlugin)
lazy val restfulapi = (project in file("modules/apirest")).
enablePlugins(PlayScala).dependsOn(util).settings(scalaVersion:="2.11.7",
libraryDependencies ++= Seq(
cache,filters,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test,
"org.mockito" % "mockito-core" % "2.5.0" % "test",
"com.nulab-inc" %% "play2-oauth2-provider" % "1.2.0"
)
)
lazy val scalatest = "org.scalatest" %% "scalatest" % "3.0.1"
lazy val util = (project in file("modules/dbmodule")).settings(scalaVersion:="2.11.7",
libraryDependencies ++= Seq( "com.typesafe.play" % "play-json_2.11" % "2.5.10",
scalatest % "test"
)
)
lazy val swaggerapidoc = (project in file("modules/apidoc"))
mappings in Universal += {
val confFile = buildEnv.value match {
case BuildEnv.Development => "development.conf"
case BuildEnv.Test => "test.conf"
case BuildEnv.Production => "production.conf"
}
((resourceDirectory in Compile).value / confFile) -> "conf/application.conf"
}