GitLab will be upgraded to the 12.10.14-ce.0 on 28 Sept 2020 at 2.00pm (AEDT) to 2.30pm (AEDT). During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to us at N110 (b) CSIT building.

build.sbt 1.67 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
lazy val makeClasspathFile = taskKey[Unit]("write the run-time classpath to target/jars.txt as colon-separated list")
7

8 9 10
lazy val root = (project in file(".")).
  settings(
    organization := "org.microvm",
11

12
    name := "mu-impl-ref2",
13

14
    version := "2.2.0",
15

16
    description := "The second reference implementation of Mu, the micro virtual machine",
17

18
    licenses := Seq("CC BY-SA 4.0" -> url("https://creativecommons.org/licenses/by-sa/4.0/legalcode")),
Kunshan Wang's avatar
Kunshan Wang committed
19

20
    scalaVersion := "2.11.8",
21

22 23 24 25 26 27 28 29 30 31
    libraryDependencies ++= Seq(
        "org.antlr" % "antlr4" % "4.5.3",
        "com.typesafe.scala-logging" %% "scala-logging" % "3.5.0",
        "ch.qos.logback" % "logback-classic" % "1.1.7",
        "com.github.jnr" % "jnr-ffi" % "2.0.9",
        "com.github.jnr" % "jffi" % "1.2.12" classifier "native",
        "com.github.jnr" % "jnr-posix" % "3.0.29",
        "org.scalatest" %% "scalatest" % "3.0.0" % "test",
        "junit" % "junit" % "4.12" % "test"
    ),
32

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

35
    parallelExecution in Test := false,  // disable parallel tests because the refimpl2 is not thread-safe
36

37
    antlr4Settings,
38

39
    antlr4PackageName in Antlr4 := Some("uvm.ir.textinput.gen"),
40

41
    antlr4GenListener in Antlr4 := false,
42

43
    antlr4GenVisitor in Antlr4 := false,
44

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

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

50
      val cpStr = cp.mkString(":")
51

52 53 54
      IO.write(new java.io.File("classpath.txt"), cpStr)
    }
  )