Skip to content

Commit

Permalink
Merge pull request #124 from Kevin-Lee/add-ammonite-repl
Browse files Browse the repository at this point in the history
Added: Ammonite-REPL for a quick try in console (test:run)
  • Loading branch information
kevin-lee committed Oct 21, 2019
2 parents 7bfd6da + 01cb79f commit 9c5fed9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ lazy val justFp = (project in file("."))
case x =>
libraryDependencies.value
}
/* Ammonite-REPL { */
, libraryDependencies ++=
(scalaBinaryVersion.value match {
case "2.10" =>
Seq.empty[ModuleID]
case "2.11" =>
Seq("com.lihaoyi" % "ammonite" % "1.6.7" % Test cross CrossVersion.full)
case _ =>
Seq("com.lihaoyi" % "ammonite" % "1.7.4" % Test cross CrossVersion.full)
})
, sourceGenerators in Test +=
(scalaBinaryVersion.value match {
case "2.10" =>
task(Seq.empty[File])
case _ =>
task {
val file = (sourceManaged in Test).value / "amm.scala"
IO.write(file, """object amm extends App { ammonite.Main.main(args) }""")
Seq(file)
}
})
/* } Ammonite-REPL */
, wartremoverErrors in (Compile, compile) ++= commonWarts((scalaBinaryVersion in update).value)
, wartremoverErrors in (Test, compile) ++= commonWarts((scalaBinaryVersion in update).value)
, testFrameworks ++= Seq(TestFramework("hedgehog.sbt.Framework"))
Expand Down

0 comments on commit 9c5fed9

Please sign in to comment.