-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
66 lines (55 loc) · 2.67 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import scala.sys.process.Process
import play.sbt.PlayImport.PlayKeys.playRunHooks
name := "play-silhouette-rest-slick-reactjs-typescript"
version := "1.0"
lazy val `play-silhouette-rest-slick-reactjs-typescript` = (project in file(".")).enablePlugins(PlayScala)
scalacOptions ++= Seq("-deprecation", "-language:_")
scalaVersion := "2.12.6"
val silhouetteVersion = "5.0.3"
val playMailerVersion = "6.0.1"
val playJsonVersion = "2.6.8"
val swaggerUIVersion = "3.6.1"
val slickVersion = "3.0.1"
val h2Version = "1.4.196"
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-slick" % slickVersion,
"com.typesafe.play" %% "play-slick-evolutions" % slickVersion,
"com.h2database" % "h2" % h2Version,
"com.mohiva" %% "play-silhouette" % silhouetteVersion,
"com.mohiva" %% "play-silhouette-persistence" % silhouetteVersion,
"com.mohiva" %% "play-silhouette-password-bcrypt" % silhouetteVersion,
"com.mohiva" %% "play-silhouette-crypto-jca" % silhouetteVersion,
"com.mohiva" %% "play-silhouette-testkit" % silhouetteVersion % "test",
"com.iheart" %% "ficus" % "1.4.3",
"com.typesafe.play" %% "play-mailer" % playMailerVersion,
"com.typesafe.play" %% "play-mailer-guice" % playMailerVersion,
"net.codingwell" %% "scala-guice" % "4.1.1",
"com.adrianhurt" %% "play-bootstrap" % "1.2-P26-B3",
"com.typesafe.play" %% "play-json" % playJsonVersion,
"com.typesafe.play" %% "play-json-joda" % playJsonVersion,
"io.swagger" %% "swagger-play2" % "1.6.1-SNAPSHOT",
"org.webjars" % "swagger-ui" % swaggerUIVersion,
specs2 % Test,
ehcache,
guice
)
unmanagedResourceDirectories in Test += (baseDirectory.value / "target/web/public/test")
resolvers += Resolver.jcenterRepo
resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
resolvers += "iheartradio-maven" at "https://dl.bintray.com/iheartradio/maven"
resolvers += "atlassian-maven" at "https://maven.atlassian.com/content/repositories/atlassian-public"
// Starts: Webpack build task
lazy val isWin = System.getProperty("os.name").toUpperCase().contains("WIN")
val appPath = if (isWin) "app\\frontend" else "./app/frontend"
val webpackBuild = taskKey[Unit]("Webpack build task.")
webpackBuild := {
if (isWin) Process("cmd /c npm start", file(appPath)).run
else Process("npm start", file(appPath)).run
}
(packageBin in Universal) := ((packageBin in Universal) dependsOn webpackBuild).value
// Ends.
// Starts: Webpack server process when running locally and build actions for production bundle
lazy val frontendDirectory = baseDirectory {_ / appPath}
playRunHooks += frontendDirectory.map(WebpackServer(_)).value
// Ends.