forked from sgodbillon/reactivemongo-demo-app
-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.sbt
86 lines (67 loc) · 1.56 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name := "reactivemongo-demo-app"
val buildVersion = "1.1.0-RC10"
version := buildVersion
resolvers ++= {
Resolver.sonatypeOssRepos("snapshots") ++:
Resolver.sonatypeOssRepos("staging")
}
scalacOptions ++= Seq(
"-encoding", "UTF-8",
"-unchecked",
"-deprecation",
"-feature",
//"-Xfatal-warnings"
)
scalacOptions ++= {
if (scalaBinaryVersion.value != "3") {
Seq(
"-target:jvm-1.8",
"-Xlint",
"-g:vars"
)
} else Seq.empty
}
scalaVersion := "3.2.2"
libraryDependencies ++= {
val os = sys.props.get("os.name") match {
case Some(osx) if osx.toLowerCase.startsWith("mac") =>
"osx"
case _ =>
"linux"
}
val playVer = buildVersion.split("-").toList match {
case major :: Nil =>
s"${major}-play28"
case vs @ _ => {
val pv = ((vs.init :+ "play28") ++ vs.lastOption.toList)
pv.mkString("-")
}
}
Seq(
guice,
"org.reactivemongo" %% "play2-reactivemongo" % playVer,
"org.reactivemongo" % s"reactivemongo-shaded-native-${os}-x86-64" % buildVersion
)
}
libraryDependencies ~= {
_.map { dep =>
if (dep.organization == "com.typesafe.play") {
dep.cross(CrossVersion.for3Use2_13)
} else {
dep
}
}
}
/* Scalafix
inThisBuild(
List(
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
)
*/
import play.sbt.routes.RoutesKeys
RoutesKeys.routesImport += "play.modules.reactivemongo.PathBindables._"
routesGenerator := InjectedRoutesGenerator
run / fork := true
lazy val root = (project in file(".")).enablePlugins(PlayScala)