-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.sbt
107 lines (92 loc) · 3.38 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
ThisBuild / version := "0.7"
ThisBuild / homepage := Some(url("https://github.com/epfl-lara/lisa"))
ThisBuild / startYear := Some(2021)
ThisBuild / organization := "ch.epfl.lara"
ThisBuild / organizationName := "LARA"
ThisBuild / organizationHomepage := Some(url("https://lara.epfl.ch"))
ThisBuild / licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html"))
ThisBuild / versionScheme := Some("semver-spec")
ThisBuild / scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
)
ThisBuild / javacOptions ++= Seq("-encoding", "UTF-8")
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
val scala2 = "2.13.8"
val scala3 = "3.5.1"
val commonSettings = Seq(
crossScalaVersions := Seq(scala3),
run / fork := true
)
val commonSettings2 = commonSettings ++ Seq(
scalaVersion := scala2,
scalacOptions ++= Seq("-Ypatmat-exhaust-depth", "50")
)
val commonSettings3 = commonSettings ++ Seq(
scalaVersion := scala3,
scalacOptions ++= Seq(
"-language:implicitConversions",
//"-rewrite", "-source", "3.4-migration",
"-Wconf:msg=.*will never be selected.*:silent"
),
javaOptions += "-Xmx10G",
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.18" % "test",
libraryDependencies += "com.lihaoyi" %% "sourcecode" % "0.4.1",
Test / parallelExecution := false,
Test / fork := true
)
def withTests(project: Project): ClasspathDependency =
project % "compile->compile;test->test"
def githubProject(repo: String, commitHash: String) = RootProject(uri(s"$repo#$commitHash"))
lazy val customTstpParser = githubProject("https://github.com/SimonGuilloud/scala-tptp-parser.git", "eae9c1b7a9546f74779d77ff50fa6e8a1654cfa0")
lazy val root = Project(
id = "lisa",
base = file("."),
)
.settings(commonSettings3)
.dependsOn(kernel, withTests(utils), withTests(sets)) // Everything but `examples`
.aggregate(utils) // To run tests on all modules
Compile / run := (sets / Compile / run).evaluated
lazy val kernel = Project(
id = "lisa-kernel",
base = file("lisa-kernel")
)
.settings(commonSettings2)
.settings(
crossScalaVersions := Seq(scala3)
)
lazy val sets = Project(
id = "lisa-sets",
base = file("lisa-sets")
)
.settings(commonSettings3)
.dependsOn(kernel, withTests(utils))
lazy val utils = Project(
id = "lisa-utils",
base = file("lisa-utils")
)
.settings(commonSettings3 ++ Seq(
libraryDependencies += "ch.epfl.lara" %% "scallion" % "0.6" from "https://github.com/epfl-lara/scallion/releases/download/v0.6/scallion_3-0.6.jar",
libraryDependencies += "ch.epfl.lara" %% "silex" % "0.6" from "https://github.com/epfl-lara/silex/releases/download/v0.6/silex_3-0.6.jar",
))
.dependsOn(kernel)
.dependsOn(customTstpParser)
//.settings(libraryDependencies += "io.github.leoprover" % "scala-tptp-parser_2.13" % "1.4")
ThisBuild / assemblyMergeStrategy := {
case PathList("module-info.class") => MergeStrategy.discard
case x if x.endsWith("/module-info.class") => MergeStrategy.discard
case x if x.endsWith(".class") => MergeStrategy.first
case x if x.endsWith(".tasty") => MergeStrategy.first
case x =>
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value
oldStrategy(x)
}
lazy val examples = Project(
id = "lisa-examples",
base = file("lisa-examples")
)
.settings(commonSettings)
.settings(commonSettings3)
.dependsOn(root)