-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
74 lines (66 loc) · 2.28 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
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
name := "SWSG"
lazy val scalaVer = "2.12.6"
scalaVersion := scalaVer
version := "0.1.0-SNAPSHOT"
lazy val circeVersion = "0.9.3"
lazy val catsVersion = "1.0.1"
lazy val swsg = crossProject(JSPlatform, JVMPlatform)
.in(file("."))
.settings(
sourceDirectories in (Compile, scalafmt) += file("shared").getAbsoluteFile / "src" / "main" / "scala",
scalaVersion := scalaVer,
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-Xfatal-warnings",
"-Xfuture",
"-Xlint",
"-Xlint:-missing-interpolator",
"-Ypartial-unification"
),
scalacOptions in (Compile, console) ~= (_ filterNot (_ == "-Xfatal-warnings")),
scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value,
libraryDependencies ++= Seq(
"org.scalatest" %%% "scalatest" % "3.0.5" % Test,
"com.chuusai" %%% "shapeless" % "2.3.3",
"org.parboiled" %%% "parboiled" % "2.1.4"
),
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core",
"io.circe" %%% "circe-generic",
"io.circe" %%% "circe-generic-extras",
"io.circe" %%% "circe-parser"
).map(_ % circeVersion),
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core",
"org.typelevel" %%% "cats-kernel",
"org.typelevel" %%% "cats-macros"
).map(_ % catsVersion),
scalafmtVersion in ThisBuild := "1.4.0",
scalafmtOnCompile in ThisBuild := true,
scalafmtTestOnCompile in ThisBuild := true,
ignoreErrors in (ThisBuild, scalafmt) := false,
TwirlKeys.templateFormats += ("php" -> "swsg.backend.PhpFormat"),
TwirlKeys.templateImports := Seq(
"play.twirl.api.TwirlFeatureImports._",
//"play.twirl.api.TwirlHelperImports._",
"play.twirl.api.Txt",
//"swsg._",
"swsg.backend._"
)
)
.jvmSettings(
libraryDependencies ++= Seq(
"com.github.pathikrit" %% "better-files" % "3.6.0",
"com.github.scopt" %% "scopt" % "3.7.0",
"org.scala-js" %% "scalajs-stubs" % scalaJSVersion % "provided"
),
assemblyJarName in assembly := "swsg.jar",
test in assembly := {}
)
.jsSettings()
.enablePlugins(SbtTwirl)
lazy val jvm = swsg.jvm
lazy val js = swsg.js