forked from Mattriplex/silver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
62 lines (52 loc) · 3.13 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
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2011-2019 ETH Zurich.
// Settings common to Silver and backends
// Compilation settings
ThisBuild / scalaVersion := "2.13.4"
ThisBuild / scalacOptions ++= Seq(
"-encoding", "UTF-8", // Enforce UTF-8, instead of relying on properly set locales
"-deprecation", // Warn when using deprecated language features
"-unchecked", // Warn on generated code assumptions
"-feature", // Warn on features that requires explicit import
"-Wunused", // Warn on unused imports
"-Ypatmat-exhaust-depth", "40" // Increase depth of pattern matching analysis
)
// Enforce UTF-8, instead of relying on properly set locales
ThisBuild / javacOptions ++= Seq("-encoding", "UTF-8", "-charset", "UTF-8", "-docencoding", "UTF-8")
ThisBuild / javaOptions ++= Seq("-Dfile.encoding=UTF-8")
// Publishing settings
// Allows 'publishLocal' SBT command to include test artifacts in a dedicated JAR file
// (whose name is postfixed by 'test-source') and publish it in the local Ivy repository.
// This JAR file contains all classes and resources for testing and projects like Carbon
// and Silicon can rely on it to access the test suit implemented in Silver.
ThisBuild / Test / publishArtifact := true
// Silver specific project settings
lazy val silver = (project in file("."))
.settings(
// General settings
name := "silver",
organization := "viper",
version := "0.1-SNAPSHOT",
// Fork test to a different JVM than SBT's, avoiding SBT's classpath interfering with
// classpath used by Scala's reflection.
Test / fork := true,
// Compilation settings
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, // Scala
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.2", // Testing
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2", // Parsing
libraryDependencies += "com.lihaoyi" %% "fastparse" % "2.2.2", // Parsing
libraryDependencies += "org.rogach" %% "scallop" % "3.5.0", // CLI parsing
libraryDependencies += "commons-io" % "commons-io" % "2.8.0", // I/O
libraryDependencies += "com.google.guava" % "guava" % "29.0-jre", // Collections
libraryDependencies += "org.jgrapht" % "jgrapht-core" % "1.5.0", // Graphs
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.30", // Logging
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3", // Logging
// Test settings.
Test / parallelExecution := false,
// Assembly settings
assembly / assemblyJarName := "silver.jar",
assembly / test := {},
)