2019-06-14 18:26:49 +03:00
|
|
|
// Global Configuration
|
2019-06-07 14:49:47 +03:00
|
|
|
organization := "org.enso"
|
|
|
|
scalaVersion := "2.12.8"
|
|
|
|
|
2019-06-14 18:26:49 +03:00
|
|
|
// Compiler Options
|
|
|
|
scalacOptions ++= Seq(
|
|
|
|
"-deprecation",
|
|
|
|
"-feature",
|
|
|
|
"-unchecked",
|
|
|
|
"-Xlint"
|
|
|
|
)
|
|
|
|
|
2019-07-11 14:23:00 +03:00
|
|
|
javacOptions ++= Seq("-source", "12", "-target", "1.8")
|
|
|
|
|
2019-06-14 18:26:49 +03:00
|
|
|
// Benchmark Configuration
|
2019-06-07 14:49:47 +03:00
|
|
|
lazy val Benchmark = config("bench") extend Test
|
2019-06-14 18:26:49 +03:00
|
|
|
lazy val bench = taskKey[Unit]("Run Benchmarks")
|
2019-06-07 14:49:47 +03:00
|
|
|
|
2019-06-14 18:26:49 +03:00
|
|
|
// Global Project
|
2019-06-13 12:49:04 +03:00
|
|
|
lazy val enso = (project in file("."))
|
2019-06-14 18:26:49 +03:00
|
|
|
.settings(version := "0.1")
|
|
|
|
.aggregate(
|
|
|
|
syntax,
|
|
|
|
pkg,
|
2019-07-10 15:13:45 +03:00
|
|
|
interpreter,
|
2019-07-24 18:36:33 +03:00
|
|
|
projectManager,
|
|
|
|
fileManager
|
2019-06-14 18:26:49 +03:00
|
|
|
)
|
2019-06-07 14:49:47 +03:00
|
|
|
|
2019-06-14 18:26:49 +03:00
|
|
|
// Sub-Projects
|
2019-06-07 15:16:59 +03:00
|
|
|
lazy val syntax = (project in file("syntax"))
|
2019-06-07 14:39:30 +03:00
|
|
|
.settings(
|
2019-06-14 18:26:49 +03:00
|
|
|
mainClass in (Compile, run) := Some("org.enso.syntax.Main"),
|
|
|
|
version := "0.1"
|
|
|
|
)
|
|
|
|
.settings(
|
2019-06-03 05:09:26 +03:00
|
|
|
libraryDependencies ++= Seq(
|
2019-06-07 15:16:59 +03:00
|
|
|
"com.storm-enroute" %% "scalameter" % "0.17" % "bench",
|
2019-06-14 18:26:49 +03:00
|
|
|
"org.typelevel" %% "cats-core" % "1.6.0",
|
|
|
|
"org.scalatest" %% "scalatest" % "3.0.5" % Test,
|
|
|
|
"com.lihaoyi" %% "pprint" % "0.5.3"
|
2019-06-03 05:09:26 +03:00
|
|
|
),
|
|
|
|
resolvers ++= Seq(
|
2019-06-14 18:26:49 +03:00
|
|
|
"Sonatype OSS Snapshots" at
|
|
|
|
"https://oss.sonatype.org/content/repositories/snapshots",
|
|
|
|
"Sonatype OSS Releases" at
|
|
|
|
"https://oss.sonatype.org/content/repositories/releases"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.settings(SbtJFlexPlugin.jflexSettings)
|
|
|
|
.configs(Test)
|
|
|
|
.settings(
|
2019-06-03 05:09:26 +03:00
|
|
|
testFrameworks += new TestFramework("org.scalameter.ScalaMeterFramework"),
|
|
|
|
logBuffered := false
|
|
|
|
)
|
2019-06-14 18:26:49 +03:00
|
|
|
.configs(Benchmark)
|
|
|
|
.settings(
|
|
|
|
inConfig(Benchmark)(Defaults.testSettings),
|
|
|
|
bench := (test in Benchmark).value,
|
|
|
|
parallelExecution in Benchmark := false
|
|
|
|
)
|
2019-06-13 12:49:04 +03:00
|
|
|
|
|
|
|
lazy val pkg = (project in file("pkg"))
|
|
|
|
.settings(
|
|
|
|
mainClass in (Compile, run) := Some("org.enso.pkg.Main"),
|
2019-06-14 18:26:49 +03:00
|
|
|
version := "0.1"
|
|
|
|
)
|
|
|
|
.settings(
|
2019-06-13 12:49:04 +03:00
|
|
|
libraryDependencies ++= Seq("circe-core", "circe-generic", "circe-yaml")
|
|
|
|
.map("io.circe" %% _ % "0.10.0"),
|
|
|
|
libraryDependencies += "commons-io" % "commons-io" % "2.6"
|
|
|
|
)
|
2019-06-14 18:26:49 +03:00
|
|
|
|
2019-07-11 14:23:00 +03:00
|
|
|
val truffleRunOptions = Seq(
|
|
|
|
fork := true,
|
|
|
|
javaOptions += s"-Dtruffle.class.path.append=${(Compile / classDirectory).value}",
|
|
|
|
javaOptions += s"-Dgraal.PrintGraph=Network",
|
|
|
|
javaOptions += s"-Dgraal.Dump=Truffle:2",
|
|
|
|
javaOptions += s"-Dgraal.TruffleBackgroundCompilation=false",
|
|
|
|
javaOptions += s"-Dgraal.TraceTruffleCompilation=true",
|
|
|
|
javaOptions += s"-Dgraal.TraceTruffleCompilationCallTree=true",
|
|
|
|
javaOptions += s"-Dgraal.TraceTruffleInlining=true",
|
|
|
|
javaOptions += s"-Dgraal.TraceTrufflePerformanceWarnings=true",
|
2019-07-17 21:00:45 +03:00
|
|
|
javaOptions += s"-Dgraal.TruffleIterativePartialEscape=true",
|
2019-07-11 14:23:00 +03:00
|
|
|
javaOptions += s"-XX:-UseJVMCIClassLoader"
|
|
|
|
)
|
|
|
|
|
2019-06-14 18:26:49 +03:00
|
|
|
lazy val interpreter = (project in file("interpreter"))
|
|
|
|
.settings(
|
|
|
|
mainClass in (Compile, run) := Some("org.enso.interpreter.Main"),
|
|
|
|
version := "0.1"
|
|
|
|
)
|
|
|
|
.settings(
|
|
|
|
libraryDependencies ++= Seq(
|
2019-07-11 14:23:00 +03:00
|
|
|
"com.chuusai" %% "shapeless" % "2.3.3",
|
|
|
|
"com.storm-enroute" %% "scalameter" % "0.17" % "bench",
|
|
|
|
"org.graalvm.sdk" % "graal-sdk" % "19.0.0",
|
|
|
|
"org.graalvm.sdk" % "polyglot-tck" % "19.0.0",
|
|
|
|
"org.graalvm.truffle" % "truffle-api" % "19.0.0",
|
|
|
|
"org.graalvm.truffle" % "truffle-dsl-processor" % "19.0.0",
|
|
|
|
"org.graalvm.truffle" % "truffle-nfi" % "19.0.0",
|
|
|
|
"org.graalvm.truffle" % "truffle-tck" % "19.0.0",
|
|
|
|
"org.graalvm.truffle" % "truffle-tck-common" % "19.0.0",
|
|
|
|
"org.scalacheck" %% "scalacheck" % "1.14.0" % Test,
|
|
|
|
"org.scalatest" %% "scalatest" % "3.2.0-SNAP10" % Test,
|
|
|
|
"org.scalactic" %% "scalactic" % "3.0.8" % Test,
|
|
|
|
"com.storm-enroute" %% "scalameter" % "0.17" % Benchmark,
|
|
|
|
"org.typelevel" %% "cats-core" % "2.0.0-M4",
|
|
|
|
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4",
|
|
|
|
"org.apache.commons" % "commons-lang3" % "3.9"
|
2019-06-14 18:26:49 +03:00
|
|
|
)
|
|
|
|
)
|
2019-07-11 14:23:00 +03:00
|
|
|
.settings(
|
|
|
|
(Compile / javacOptions) ++= Seq(
|
|
|
|
"-s",
|
|
|
|
(Compile / sourceManaged).value.getAbsolutePath
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.settings(
|
|
|
|
(Compile / compile) := (Compile / compile)
|
|
|
|
.dependsOn(Def.task { (Compile / sourceManaged).value.mkdirs })
|
|
|
|
.value
|
|
|
|
)
|
|
|
|
.settings(
|
|
|
|
inConfig(Compile)(truffleRunOptions),
|
|
|
|
inConfig(Test)(truffleRunOptions),
|
2019-07-11 18:30:14 +03:00
|
|
|
parallelExecution in Test := false,
|
|
|
|
logBuffered in Test := false
|
2019-07-11 14:23:00 +03:00
|
|
|
)
|
2019-06-14 18:26:49 +03:00
|
|
|
.configs(Benchmark)
|
|
|
|
.settings(
|
2019-07-11 14:23:00 +03:00
|
|
|
testFrameworks += new TestFramework("org.scalameter.ScalaMeterFramework"),
|
|
|
|
logBuffered := false,
|
2019-06-14 18:26:49 +03:00
|
|
|
inConfig(Benchmark)(Defaults.testSettings),
|
2019-07-11 14:23:00 +03:00
|
|
|
inConfig(Benchmark)(truffleRunOptions),
|
2019-06-14 18:26:49 +03:00
|
|
|
bench := (test in Benchmark).value,
|
|
|
|
parallelExecution in Benchmark := false
|
|
|
|
)
|
2019-07-10 15:13:45 +03:00
|
|
|
|
2019-07-24 18:36:33 +03:00
|
|
|
val akkaActor = "com.typesafe.akka" %% "akka-actor" % "2.5.23"
|
|
|
|
val akkaStream = "com.typesafe.akka" %% "akka-stream" % "2.5.23"
|
|
|
|
val akkaHttp = "com.typesafe.akka" %% "akka-http" % "10.1.8"
|
|
|
|
val akkaSpray = "com.typesafe.akka" %% "akka-http-spray-json" % "10.1.8"
|
|
|
|
val akkaTyped = "com.typesafe.akka" %% "akka-actor-typed" % "2.5.23"
|
|
|
|
val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % "2.5.23"
|
|
|
|
val akkaSLF4J = "com.typesafe.akka" %% "akka-slf4j" % "2.5.23"
|
|
|
|
val akkaTestkitTyped = "com.typesafe.akka" %% "akka-actor-testkit-typed" % "2.5.23" % Test
|
2019-07-10 15:13:45 +03:00
|
|
|
|
|
|
|
val akka = Seq(akkaActor, akkaStream, akkaHttp, akkaSpray, akkaTyped)
|
|
|
|
|
|
|
|
val circe = Seq("circe-core", "circe-generic", "circe-yaml").map(
|
|
|
|
"io.circe" %% _ % "0.10.0"
|
|
|
|
)
|
|
|
|
|
2019-07-24 18:36:33 +03:00
|
|
|
lazy val fileManager = (project in file("FileManager"))
|
|
|
|
.settings(
|
|
|
|
(Compile / mainClass) := Some("org.enso.filemanager.FileManager")
|
|
|
|
)
|
|
|
|
.settings(
|
|
|
|
libraryDependencies ++= akka,
|
|
|
|
libraryDependencies += akkaSLF4J,
|
|
|
|
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3",
|
|
|
|
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.0-SNAP10" % Test,
|
|
|
|
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.0" % Test,
|
|
|
|
libraryDependencies += akkaTestkitTyped,
|
|
|
|
libraryDependencies += "commons-io" % "commons-io" % "2.6",
|
|
|
|
libraryDependencies += "io.methvin" % "directory-watcher" % "0.9.6"
|
|
|
|
)
|
|
|
|
|
2019-07-10 15:13:45 +03:00
|
|
|
lazy val projectManager = (project in file("project-manager"))
|
|
|
|
.settings(
|
|
|
|
(Compile / mainClass) := Some("org.enso.projectmanager.Server")
|
|
|
|
)
|
|
|
|
.settings(
|
|
|
|
libraryDependencies ++= akka,
|
|
|
|
libraryDependencies ++= circe,
|
|
|
|
libraryDependencies += "io.spray" %% "spray-json" % "1.3.5"
|
|
|
|
)
|
|
|
|
.dependsOn(pkg)
|