Skip to main content

Configuration Reference

All configuration fields are optional. The plugin will use sbt defaults for any field not specified.

Available Fields

FieldTypeDescription
nameStringProject name
organizationStringOrganization/group ID
versionStringProject version
scalaVersionStringScala compiler version
scalacOptionsArray[String]Scala compiler options
dependenciesArray[String] or ObjectCompile dependencies (see Dependencies)
testDependenciesArray[String] or ObjectTest dependencies (see Dependencies)
homepageStringProject homepage URL
licensesArray[String]License identifiers (e.g., "MIT", "Apache2")
versionSchemeStringVersion scheme (e.g., "early-semver", "semver-spec")
developersArray[Object]List of project developers

Example

A complete build.conf example:

name = "my-project"
organization = "com.example"
version = "1.0.0"

scalaVersion = "3.3.4"

scalacOptions = [
"-deprecation",
"-feature",
"-unchecked"
]

dependencies = [
"org.typelevel:cats-core:2.13.0",
"io.circe:circe-core:0.14.10"
]

testDependencies = [
"org.scalatest:scalatest:3.2.19"
]

homepage = "https://github.com/example/my-project"
licenses = ["MIT"]
versionScheme = "early-semver"

developers = [
{
id = "johndoe"
name = "John Doe"
email = "john@example.com"
url = "https://johndoe.dev"
}
]

Plugin Settings

SettingTypeDefaultDescription
sbtConfigFileFilebuild.confPath to the HOCON config file
sbtConfigPlatformPlatformauto-detectedProject platform (Platform.Jvm, Platform.Js, or Platform.Native)

To use a different config file:

sbtConfigFile := baseDirectory.value / "project.conf"

The platform is auto-detected from sbt-scalajs / sbt-scala-native plugins. Override it if needed:

sbtConfigPlatform := Platform.Js