An sbt plugin that overrides the build cycle to compile Etlas projects located in
src/main/eta
. It also provides tasks for compiling & running Scala/Eta programs.
- Etlas >= 1.5.0.0
-
Make sure it's visible on the
PATH
.etlas --version
-
Add the following to your project/plugins.sbt
file:
addSbtPlugin("com.typelead" % "sbt-eta" % "0.3.0")
For projects using Eta enable SbtEta plugin, e.g.:
val root = (project in file(".")).enablePlugins(SbtEta)
An example project integration Eta with Scala is provided in the example directory.
An example of multi-project build included Eta projects is provided in the example-multi directory.
-
Create a standard Scala/SBT project using your favorite method.
-
Describe Eta project in
build.sbt
using plugin's DSL. -
Write Scala/Eta code to perform your task.
-
Start up
sbt
and run thecompile
and/orrun
task.
baseDirectory in Eta := target.value / "eta"
- Type:
File
- Default:
target/eta
This is the root of your Etlas project (where the .cabal
file is placed).
target in Eta := target.value / "eta" / "dist"
- Type:
File
- Default:
target/eta/dist
This is where all of Etlas's build artifacts are stored.
sourceDirectory in EtaLib := (sourceDirectory in Compile).value / "eta"
- Type:
File
- Default:
src/main/eta
This is a directory containing sources of your Etlas project.
TODO
By default the directory structure of project looks like the default one used by SBT and Maven:
example/
├── build.sbt
├── src/
| ├── main/
| │ ├── eta/
| │ │ └── Example/
| │ │ └── Transform.hs
| │ └── java/
| │ └── Main.java
| └── test/
| └── eta/
| └── Example/
| └── TransformTest.hs
└── target/
└── eta/
├── dist/
└── example-eta.cabal
sbt-eta
is available under the BSD 3-Clause License, see LICENSE for
more information.