forked from outwatch/outwatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
122 lines (100 loc) · 3.09 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
inThisBuild(Seq(
version := "0.11.1-SNAPSHOT",
organization := "io.github.outwatch",
scalaVersion := "2.12.6",
crossScalaVersions := Seq("2.11.12", "2.12.6", "2.13.0-M5"),
licenses += ("Apache 2", url("https://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://outwatch.github.io/")),
scmInfo := Some(ScmInfo(
url("https://github.com/OutWatch/outwatch"),
"scm:git:[email protected]:OutWatch/outwatch.git",
Some("scm:git:[email protected]:OutWatch/outwatch.git"))
)
))
lazy val commonSettings = Seq(
scalacOptions += {
val local = baseDirectory.value.toURI
val remote = s"https://raw.githubusercontent.com/OutWatch/outwatch/${git.gitHeadCommit.value.get}/"
s"-P:scalajs:mapSourceURI:$local->$remote"
},
scalacOptions ++=
"-encoding" :: "UTF-8" ::
"-unchecked" ::
"-deprecation" ::
"-explaintypes" ::
"-feature" ::
"-language:_" ::
"-Xfuture" ::
"-Xlint" ::
"-Ypartial-unification" ::
"-Yno-adapted-args" ::
"-Ywarn-infer-any" ::
"-Ywarn-value-discard" ::
"-Ywarn-nullary-override" ::
"-Ywarn-nullary-unit" ::
"-P:scalajs:sjsDefinedByDefault" ::
Nil,
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) =>
"-Ywarn-extra-implicit" ::
"-Ywarn-unused:-explicits,-implicits,_" ::
Nil
case _ =>
"-Ywarn-unused" ::
"-Xexperimental" :: // SAM conversion
Nil
}
}
)
lazy val outwatch = project
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
.settings(commonSettings)
.settings(
name := "OutWatch",
normalizedName := "outwatch",
libraryDependencies ++= Seq(
"io.monix" %%% "monix" % "3.0.0-RC2",
"org.scala-js" %%% "scalajs-dom" % "0.9.7",
"com.raquo" %%% "domtypes" % "0.9.4",
"org.typelevel" %%% "cats-core" % "1.6.0",
"org.typelevel" %%% "cats-effect" % "1.3.0",
"org.scalatest" %%% "scalatest" % "3.0.5" % Test
),
npmDependencies in Compile ++= Seq(
"snabbdom" -> "git://github.com/cornerman/snabbdom.git#semver:0.7.3"
),
requireJsDomEnv in Test := true,
useYarn := true,
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomExtra :=
<developers>
<developer>
<id>ltj</id>
<name>Luka Jacobowitz</name>
<url>https://github.com/LukaJCB</url>
</developer>
</developers>,
pomIncludeRepository := { _ => false }
)
lazy val bench = project
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
.settings(commonSettings)
.dependsOn(outwatch)
.settings(
publish := {},
publishLocal := {},
scalaJSStage in Compile := FullOptStage,
scalaJSUseMainModuleInitializer := true,
useYarn := true,
npmDependencies in Compile ++= Seq(
"jsdom" -> "9.9.0"
),
)