Search code examples
scalasbtdotty

Is there a simple way to compile an sbt project with Dotty?


Now that Dotty is apparently getting ready to compile larger projects, I wonder if there is a simple way to use it as drop-in replacement for Scalac in sbt projects? Like if I had the following build.sbt:

name := "Foo"

scalaVersion := "2.11.7"

Are there some steps I can take to swap out Scalac for Dotc here?


Solution

  • We've merged #2344 Make sbt aware of Dotty feature contributed by Guillaume Martres, and it will be part of 0.13.10. In the meantime you can try it with the nightly published to https://repo.scala-sbt.org/scalasbt/ivy-snapshots/.