scala/scala3-example-project

An example sbt project that compiles using Dotty

Scala

340

458 commits

updated Sep 20, 2026

See the code

README

Example sbt project that compiles using Scala 3

Continuous Integration

Usage

This is a normal sbt project. You can start the sbt shell using sbt then compile code with compile, run the main method with run, run the tests with test and start a REPL using console.

If compiling this example project fails, you probably have a global sbt plugin that does not work with Scala 3. You might try disabling plugins in ~/.sbt/1.0/plugins and ~/.sbt/1.0.

Making a new Scala 3 project

The fastest way to start a new Scala 3 project is to use one of the following templates:

Using Scala 3 in an existing project

You will need to make the following adjustments to your build:

project/build.properties

sbt.version=2.0.4

build.sbt

Set the Scala 3 version:

scalaVersion := "3.8.4"

Note that as of Scala 3.8, you need JDK 17 or higher.

Getting your project to compile with Scala 3

For help with porting an existing Scala 2 project to Scala 3, see the Scala 3 migration guide.

Need help?

https://www.scala-lang.org/community/ has links.

dotty
epfl
sbt
scala

Contributors

(top 30 of 33)

scala-steward

116 commits

smarter

110 commits

nicolasstucki

44 commits

Philippus

31 commits

scala/scala3-example-project

An example sbt project that compiles using Dotty

Scala

340

458 commits

updated Sep 20, 2026

See the code

README

Example sbt project that compiles using Scala 3

Continuous Integration

Usage

This is a normal sbt project. You can start the sbt shell using sbt then compile code with compile, run the main method with run, run the tests with test and start a REPL using console.

If compiling this example project fails, you probably have a global sbt plugin that does not work with Scala 3. You might try disabling plugins in ~/.sbt/1.0/plugins and ~/.sbt/1.0.

Making a new Scala 3 project

The fastest way to start a new Scala 3 project is to use one of the following templates:

Using Scala 3 in an existing project

You will need to make the following adjustments to your build:

project/build.properties

sbt.version=2.0.4

build.sbt

Set the Scala 3 version:

scalaVersion := "3.8.4"

Note that as of Scala 3.8, you need JDK 17 or higher.

Getting your project to compile with Scala 3

For help with porting an existing Scala 2 project to Scala 3, see the Scala 3 migration guide.

Need help?

https://www.scala-lang.org/community/ has links.

dotty
epfl
sbt
scala

Contributors

(top 30 of 33)

scala-steward

116 commits

smarter

110 commits

nicolasstucki

44 commits

Philippus

31 commits

Languages

Scala

100.0%