Skip to main content
Version: 2.20 (deprecated)

scala


Scala programming language

Backend: pants.backend.experimental.scala

Config section: [scala]

Basic options

version_for_resolve

--scala-version-for-resolve="{'key1': val1, 'key2': val2, ...}"
PANTS_SCALA_VERSION_FOR_RESOLVE
pants.toml
[scala.version_for_resolve]
key1 = val1
key2 = val2
...
default: {}

A dictionary mapping the name of a resolve to the Scala version to use for all Scala targets consuming that resolve.

All Scala-compiled jars on a resolve's classpath must be "compatible" with one another and with all Scala-compiled first-party sources from scala_sources (and other Scala target types) using that resolve. The option sets the Scala version that will be used to compile all first-party sources using the resolve. This ensures that the compatibility property is maintained for a resolve. To support multiple Scala versions, use multiple resolves.

Advanced options

tailor_source_targets

--[no-]scala-tailor-source-targets
PANTS_SCALA_TAILOR_SOURCE_TARGETS
pants.toml
[scala]
tailor_source_targets = <bool>
default: True

If true, add scala_sources, scala_junit_tests, and scalatest_tests targets with the tailor goal.

Deprecated options

None

None