build.sbt 1.48 KB
Newer Older
1 2 3 4 5

lazy val genSrc = taskKey[List[File]]("generate sources")

genSrc <<= (sourceGenerators in Compile) { _.join.map(_.flatten.toList) }

6
organization := "org.microvm"
7

Kunshan Wang's avatar
Kunshan Wang committed
8
name := "mu-impl-ref2"
9

Kunshan Wang's avatar
Kunshan Wang committed
10
version := "2.2.0"
11

12
description := "The second reference implementation of Mu, the micro virtual machine"
13

14
licenses := Seq("CC BY-SA 4.0" -> url("https://creativecommons.org/licenses/by-sa/4.0/legalcode"))
15

Kunshan Wang's avatar
Kunshan Wang committed
16
scalaVersion := "2.11.8"
Kunshan Wang's avatar
Kunshan Wang committed
17

18
libraryDependencies ++= Seq(
Kunshan Wang's avatar
Kunshan Wang committed
19
    "org.antlr" % "antlr4" % "4.5.2-1",
20 21
    "com.typesafe.scala-logging" %% "scala-logging" % "3.1.0",
    "ch.qos.logback" % "logback-classic" % "1.1.3",
Kunshan Wang's avatar
Kunshan Wang committed
22 23 24 25
    "com.github.jnr" % "jnr-ffi" % "2.0.9",
    "com.github.jnr" % "jffi" % "1.2.11",
    "com.github.jnr" % "jnr-posix" % "3.0.29",
    "org.scalatest" %% "scalatest" % "2.2.6" % "test",
26 27
    "junit" % "junit" % "4.12" % "test"
)
28

29
testOptions in Test += Tests.Argument("-oF") // print full stack trace when testing
30

31 32
parallelExecution in Test := false  // disable parallel tests because the refimpl2 is not thread-safe

33
antlr4Settings
34

35
antlr4PackageName in Antlr4 := Some("uvm.ir.textinput.gen")
36

37 38 39
antlr4GenListener in Antlr4 := false

antlr4GenVisitor in Antlr4 := false
40

Kunshan Wang's avatar
Kunshan Wang committed
41
lazy val makeClasspathFile = taskKey[Unit]("write the run-time classpath to target/jars.txt as colon-separated list")
42

Kunshan Wang's avatar
Kunshan Wang committed
43 44 45 46
makeClasspathFile := {
  val cp = (fullClasspath in Runtime).value.files 

  println("fullClasspath: \n" + cp.mkString("\n"))
47

Kunshan Wang's avatar
Kunshan Wang committed
48
  val cpStr = cp.mkString(":")
49

50
  IO.write(new java.io.File("classpath.txt"), cpStr)
51
}