typelead / sbt-eta   0.3.0

BSD 3-clause "New" or "Revised" License GitHub

An sbt plugin that integrates Eta into Scala projects.

Scala versions: 2.12
sbt plugins: 1.0


Build Status

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 >=
    • 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.


  1. Create a standard Scala/SBT project using your favorite method.

  2. Describe Eta project in build.sbt using plugin's DSL.

  3. Write Scala/Eta code to perform your task.

  4. Start up sbt and run the compile and/or run 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.


Project layout

By default the directory structure of project looks like the default one used by SBT and Maven:

   ├── 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.