Heroku Buildpack: Scala (sbt) [](https://github.com/heroku/heroku-buildpack-scala/actions/workflows/ci.yml)

June 29, 2026 ยท View on GitHub

Heroku Buildpack: Scala (sbt) CI

This is the official Heroku buildpack for apps that use sbt as their build tool. It's primarily used to build Scala applications, but it can also build applications written in other JVM languages (such as Play Framework apps written in Java).

If you're using a different JVM build tool, use the appropriate buildpack:

Table of Contents

Supported sbt Versions

This buildpack officially supports sbt 1.x and 2.x. Best-effort support is available for apps using sbt 0.13.18.

Getting Started

See the Getting Started on Heroku with Scala tutorial.

Application Requirements

Your app requires at least one .sbt file and a project/build.properties file in the root directory. The project/build.properties file must define the sbt.version property.

The buildpack uses the stage sbt task to build your application. The easiest way to provide this task is with sbt-native-packager, which includes it by default.

Configuration

OpenJDK Version

Specify an OpenJDK version by creating a system.properties file in the root of your project directory and setting the java.runtime.version property. See the Java Support article for available versions and configuration instructions.

sbt Version

The buildpack uses the sbt.version property in your project/build.properties file to determine which sbt version to use. Update this property to change the sbt version.

Buildpack Configuration

Configure the buildpack by setting environment variables:

Environment VariableDescriptionDefault
SBT_TASKSsbt tasks to executecompile stage
SBT_OPTSJVM options for sbt execution(none)
SBT_CLEANRun clean task before buildfalse
SBT_PROJECTFor multi-project builds, specifies which project to build(none)
SBT_AT_RUNTIMEMake sbt available at runtimetrue
KEEP_SBT_CACHEPrevent removal of compilation artifacts from slugfalse

Documentation

For more information about using Scala on Heroku, see the Scala Support documentation on Dev Center.