/
build.sbt
104 lines (88 loc) · 3.59 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
lazy val commonSettings = Seq(
organization := "com.monsanto.labs",
licenses += ("BSD", url("http://opensource.org/licenses/BSD-3-Clause")),
crossScalaVersions := Seq("2.12.4", "2.11.8"),
scalaVersion := crossScalaVersions.value.head,
releaseCrossBuild := true,
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
"-Xcheckinit",
"-Xlint",
"-Xverify",
"-Yno-adapted-args",
"-encoding", "utf8") ++
scalacVersionOptions(scalaBinaryVersion.value),
testOptions in Test ++= Seq(
Tests.Argument(TestFrameworks.ScalaTest, "-oD"),
Tests.Argument(TestFrameworks.ScalaTest, "-u", (target.value / "test-reports").getPath),
Tests.Argument(TestFrameworks.ScalaTest, "-h", (target.value / "test-reports-html").getPath)
)
) ++ PluginConfig.gitStampSettings ++ PluginConfig.buildPropertiesSettings ++ PluginConfig.bintraySettings
lazy val scalacVersionOptions: Map[String, Seq[String]] = Map(
"2.11" -> Seq(
"-Yclosure-elim",
"-Yinline",
"-target:jvm-1.7"),
"2.12" -> Seq.empty
)
lazy val breeze = "0.13"
lazy val circe = "0.9.3"
lazy val mwundo = project.in(file("."))
.aggregate(`mwundo-coreJVM`,`mwundo-coreJS`,`mwundo-spray`, `mwundo-circeJVM`,`mwundo-circeJS`)
.settings(commonSettings)
.settings(Seq(
packagedArtifacts := Map.empty,
publishArtifact := false,
publish := {}
))
lazy val `mwundo-core` = crossProject(JSPlatform, JVMPlatform).in(file("core"))
// .crossType(CrossType.Pure)
.settings(commonSettings)
.settings(Seq(
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.5.0" % "test",
"org.pegdown" % "pegdown" % "1.4.2" % "test"
)
)).jvmSettings(Seq(
libraryDependencies ++= Seq(
"org.scalanlp" %% "breeze" % breeze,
"org.scalanlp" %% "breeze-natives" % breeze,
"com.vividsolutions" % "jts-core" % "1.14.0")))
lazy val `mwundo-coreJVM`= `mwundo-core`.jvm
lazy val `mwundo-coreJS`= `mwundo-core`.js
lazy val `mwundo-spray` = project.in(file("spray"))
.dependsOn(`mwundo-coreJVM`)
.settings(commonSettings)
.settings(Seq(
libraryDependencies ++= Seq(
"io.spray" %% "spray-json" % "1.3.2",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.5.0" % "test",
"org.pegdown" % "pegdown" % "1.4.2" % "test"
)
))
lazy val `mwundo-circe` = crossProject(JSPlatform, JVMPlatform)
.in(file("circe"))
// .crossType(CrossType.Pure)
.dependsOn(`mwundo-core`)
.settings(commonSettings)
.settings(Seq(
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core" % circe,
"io.circe" %%% "circe-generic" % circe,
"io.circe" %%% "circe-parser" % circe,
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.5.0" % "test",
"org.pegdown" % "pegdown" % "1.4.2" % "test"
)
)
)
lazy val `mwundo-circeJVM`= `mwundo-circe`.jvm
lazy val `mwundo-circeJS`= `mwundo-circe`.js