sbt 2 has officially launched after five years of development and over 82 contributors. Key changes include using Scala 3.8.4 for build definitions (requiring JDK 17 minimum), a native sbtn client for faster startup and client-server architecture by default, incremental testing, a Bazel-compatible local/remote cache system, in-sourced project matrix support for cross-building JVM/JS/Native, and simplified cross-published library dependency syntax (using %% instead of %%% in most cases). Major plugins like Scala.js, Scala Native, and sbt-assembly are already available, with Play framework support still pending. Upgrading requires setting sbt.version=2.0.1 in project/build.properties.
Table of contents
What’s new in sbt 2?How do I get started with sbt 2?Repopulating the plugin ecosystemClient-server by defaultProject matrixUsing cross-published librariesLet us know what you thinkParticipationQuestions this post answers
How do I upgrade my project to sbt 2?
Set sbt.version=2.0.1 in project/build.properties, which upgrades only the builds you choose. Download the official sbt runner from SDKMAN or from the sbt GitHub releases page to get the updated sbt shell script, sbtn native client, and launcher. sbt 2.x requires a minimum of JDK 17 and uses Scala 3.8.4 for build definitions and plugins. daily.dev helps Scala teams track build tool upgrades like the sbt 2 migration as they roll out.
What are the main new features in sbt 2 compared to sbt 1.x?
sbt 2 adds a local/remote Bazel-compatible cache system with cachable compile and test tasks, incremental testing, in-sourced project matrix for cross-building JVM/JS/Native, and a client-server architecture using the sbtn native-image client for faster startup. It also simplifies cross-built dependency declarations, allowing %% instead of %%% for Scala.js and Scala Native libraries. Developers evaluating build tool changes can follow sbt 2 feature rollouts on daily.dev.
Which sbt plugins are already compatible with sbt 2?
Scala.JS 1.22.0, Scala Native 0.5.11, and sbt-assembly 2.3.1 are already published and available for sbt 2.x, enabling cross builds across JVM, JS, and Native platforms. Play framework support is still in progress, with only a milestone release (3.1.0-M9) available. A compatibility plugin called sbt2-compat bridges source-level differences to aid plugin migration. Teams planning a migration can check plugin compatibility status for sbt 2 on daily.dev.