-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
60 lines (54 loc) · 2.03 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
import Wart._
enablePlugins(ScalaJSPlugin)
ThisBuild / scalaVersion := "2.13.12"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / organization := "io.lptk"
ThisBuild / organizationName := "LPTK"
lazy val root = project.in(file("."))
.aggregate(mlscriptJS, mlscriptJVM)
.settings(
publish := {},
publishLocal := {},
)
lazy val mlscript = crossProject(JSPlatform, JVMPlatform).in(file("."))
.settings(
name := "mlscript",
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked",
"-language:higherKinds",
"-Ywarn-value-discard",
"-Ypatmat-exhaust-depth:160",
),
scalacOptions ++= {
if (insideCI.value) Seq("-Wconf:any:error")
else Seq("-Wconf:any:warning")
},
wartremoverWarnings ++= Warts.allBut(
Recursion, Throw, Nothing, Return, While, IsInstanceOf,
Var, MutableDataStructures, NonUnitStatements,
DefaultArguments, ImplicitParameter, ImplicitConversion,
StringPlusAny, Any, ToString,
JavaSerializable, Serializable, Product, ToString,
LeakingSealed, Overloading,
Option2Iterable, IterableOps, ListAppend, SeqApply,
TripleQuestionMark,
),
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.12" % Test,
libraryDependencies += "com.lihaoyi" %%% "sourcecode" % "0.3.0",
libraryDependencies += "com.lihaoyi" %%% "fastparse" % "2.3.3",
libraryDependencies += "com.lihaoyi" %% "os-lib" % "0.8.0",
//
watchSources += WatchSource(
sourceDirectory.value.getParentFile().getParentFile()/"shared/src/test/diff", "*.fun", NothingFilter),
watchSources += WatchSource(
sourceDirectory.value.getParentFile().getParentFile()/"shared/src/test/diff", "*.mls", NothingFilter),
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oC"),
)
.jsSettings(
scalaJSUseMainModuleInitializer := true,
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "2.1.0",
)
lazy val mlscriptJVM = mlscript.jvm
lazy val mlscriptJS = mlscript.js