-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
33 lines (25 loc) · 1.08 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
val scala3Version = "3.6.2"
lazy val root = project
.in(file("."))
.settings(
name := "compilerbau-minijava",
version := "0.1.0-SNAPSHOT",
scalaVersion := scala3Version,
libraryDependencies ++= Seq(
"org.scalameta" %% "munit" % "1.0.0" % Test,
"org.antlr" % "antlr4" % "4.13.2", // ANTLR runtime
"org.ow2.asm" % "asm" % "9.7", // ASM core library
"org.ow2.asm" % "asm-tree" % "9.7", // ASM tree API (optional)
"org.antlr" % "antlr4-runtime" % "4.13.2" // ANTLR runtime dependency
)
)
// enable and configure AntlrPlugin (compile g4 File with `sbt clean compile`)
enablePlugins(Antlr4Plugin)
Antlr4 / antlr4Version := "4.13.2"
Antlr4 / antlr4GenListener := true
Antlr4 / antlr4GenVisitor := true
Antlr4 / antlr4PackageName := Some("de.students.antlr")
// add the generated files to the compile path, as they are nested in an additional antlr4 directory
Compile / unmanagedSourceDirectories += baseDirectory.value / "src" / "main" / "antlr4"
// Enable Scalafmt on Compile
scalafmtOnCompile := true