sbt

package sbt

Members list

Concise view

Type members

Classlikes

object Append

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Append.type
abstract class AutoPlugin extends Basic with PluginsFunctions

An AutoPlugin defines a group of settings and the conditions where the settings are automatically added to a build (called "activation"). The requires and trigger methods together define the conditions, and a method like projectSettings defines the settings to add.

An AutoPlugin defines a group of settings and the conditions where the settings are automatically added to a build (called "activation"). The requires and trigger methods together define the conditions, and a method like projectSettings defines the settings to add.

Steps for plugin authors:

  1. Determine if the AutoPlugin should automatically be activated when all requirements are met, or should be opt-in.
  2. Determine the AutoPlugins that, when present (or absent), act as the requirements for the AutoPlugin.
  3. Determine the settings/configurations to that the AutoPlugin injects when activated.
  4. Determine the keys and other names to be automatically imported to *.sbt scripts.

For example, the following will automatically add the settings in projectSettings to a project that has both the Web and Javascript plugins enabled.

object MyPlugin extends sbt.AutoPlugin {
 override def requires = Web && Javascript
 override def trigger = allRequirements
 override def projectSettings = Seq(...)

 object autoImport {
   lazy val obfuscate = taskKey[Seq[File]]("Obfuscates the source.")
 }
}

Steps for users:

  1. Add dependencies on plugins in project/plugins.sbt as usual with addSbtPlugin
  2. Add key plugins to projects, which will automatically select the plugin + dependent plugin settings to add for those projects.
  3. Exclude plugins, if desired.

For example, given plugins Web and Javascript (perhaps provided by plugins added with addSbtPlugin),

myProject.enablePlugins(Web && Javascript)

will activate MyPlugin defined above and have its settings automatically added. If the user instead defines

myProject.enablePlugins(Web && Javascript).disablePlugins(MyPlugin)

then the MyPlugin settings (and anything that activates only when MyPlugin is activated) will not be added.

Attributes

Graph
Supertypes
class Basic
trait Plugins
class Object
trait Matchable
class Any
final class AutoPluginException extends RuntimeException

An error that occurs when auto-plugins aren't configured properly. It translates the error from the underlying logic system to be targeted at end users.

An error that occurs when auto-plugins aren't configured properly. It translates the error from the underlying logic system to be targeted at end users.

Attributes

Companion:
object
Graph
Supertypes
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final case class BuildRef(build: URI) extends BuildReference with ResolvedReference

Uniquely identifies a build by a URI.

Uniquely identifies a build by a URI.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Reference
class Object
trait Matchable
class Any
sealed trait BuildReference extends Reference

Identifies a build.

Identifies a build.

Attributes

Graph
Supertypes
trait Reference
class Object
trait Matchable
class Any
Known subtypes
class BuildRef
object ThisBuild.type

Attributes

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Project
final case class ConfigKey(name: String)

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object ConfigKey

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object Def extends Init[Scope] with TaskMacroExtra with InitializeImplicits

A concrete settings system that uses sbt.Scope for the scope type.

A concrete settings system that uses sbt.Scope for the scope type.

Attributes

Graph
Supertypes
trait Init[Scope]
class Object
trait Matchable
class Any
Self type
Def.type
sealed trait DelegateIndex

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Def.type
Self type
Def.type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Def.type
Self type
Def.type
sealed trait InputKey[A1] extends Scoped with KeyedInitialize[InputTask[A1]] with ScopingSetting[InputKey[A1]] with DefinableSetting[InputTask[A1]]

Identifies an input task. An input task parses input and produces a task to run. It consists of three parts: the scope, the name, and the type of the value produced by an input task associated with this key. The scope is represented by a value of type Scope. The name and the type are represented by a value of type AttributeKey[InputTask[T]]. Instances are constructed using the companion object.

Identifies an input task. An input task parses input and produces a task to run. It consists of three parts: the scope, the name, and the type of the value produced by an input task associated with this key. The scope is represented by a value of type Scope. The name and the type are represented by a value of type AttributeKey[InputTask[T]]. Instances are constructed using the companion object.

Attributes

Companion:
object
Graph
Supertypes
trait Keyed[InputTask[A1], InputTask[A1]]
trait Scoped
trait Equals
class Object
trait Matchable
class Any
object InputKey

Constructs InputKeys, which are associated with input tasks to define a setting.

Constructs InputKeys, which are associated with input tasks to define a setting.

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class InputTask[A1]

Parses input and produces a task to run. Constructed using the companion object.

Parses input and produces a task to run. Constructed using the companion object.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object InputTask

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object KeyRanks

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final case class LocalProject(project: String) extends ProjectReference

Identifies a project in the current build context.

Identifies a project in the current build context.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Reference
class Object
trait Matchable
class Any

Identifies the root project in the current build context.

Identifies the root project in the current build context.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Reference
class Object
trait Matchable
class Any
Self type
class ParserGen[A1](val p: Initialize[State => Parser[A1]])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
sealed trait Plugins

An expression that matches AutoPlugins.

An expression that matches AutoPlugins.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Basic
object Plugins extends PluginsFunctions

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Plugins.type
sealed trait PluginsFunctions

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Plugins.type
object Previous

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object Project

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Project.type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Indicate whether the project was created organically, synthesized by a plugin, or is a "generic root" project supplied by sbt when a project doesn't exist for file(".").

Indicate whether the project was created organically, synthesized by a plugin, or is a "generic root" project supplied by sbt when a project doesn't exist for file(".").

Attributes

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
final case class ProjectRef(build: URI, project: String) extends ProjectReference with ResolvedReference

Uniquely references a project by a URI and a project identifier String.

Uniquely references a project by a URI and a project identifier String.

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Reference
class Object
trait Matchable
class Any
object ProjectRef

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait ProjectReference extends Reference

Identifies a project.

Identifies a project.

Attributes

Graph
Supertypes
trait Reference
class Object
trait Matchable
class Any
Known subtypes
object LocalRootProject.type
object ThisProject.type
final class PromiseWrap[A]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
sealed trait Reference

Identifies a project or build.

Identifies a project or build.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Reference

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object Remove

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Remove.type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
sealed trait ResolvedReference extends Reference

A fully resolved, unique identifier for a project or build.

A fully resolved, unique identifier for a project or build.

Attributes

Graph
Supertypes
trait Reference
class Object
trait Matchable
class Any
Known subtypes
class BuildRef
final case class RootProject(build: URI) extends ProjectReference

Identifies the root project in the specified build.

Identifies the root project in the specified build.

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Reference
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Scope(project: ScopeAxis[Reference], config: ScopeAxis[ConfigKey], task: ScopeAxis[AttributeKey[_]], extra: ScopeAxis[AttributeMap])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object Scope

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Scope.type
sealed trait ScopeAxis[+S]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Select[S]
object This.type
object Zero.type
object ScopeAxis

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ScopeMask(project: Boolean, config: Boolean, task: Boolean, extra: Boolean)

Specifies the Scope axes that should be used for an operation. true indicates an axis should be used.

Specifies the Scope axes that should be used for an operation. true indicates an axis should be used.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
sealed trait Scoped extends Equals

An abstraction on top of Settings for build configuration and task definition.

An abstraction on top of Settings for build configuration and task definition.

Attributes

Companion:
object
Graph
Supertypes
trait Equals
class Object
trait Matchable
class Any
Known subtypes
trait InputKey[A1]
class SettingKey[A1]
class TaskKey[A1]
object Scoped

Methods and types related to constructing settings, including keys, scopes, and initializations.

Methods and types related to constructing settings, including keys, scopes, and initializations.

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Scoped.type
sealed trait ScopedTaskable[A] extends Scoped with Taskable[A]

A common type for SettingKey and TaskKey so that both can be used as inputs to tasks.

A common type for SettingKey and TaskKey so that both can be used as inputs to tasks.

Attributes

Graph
Supertypes
trait Taskable[A]
trait Scoped
trait Equals
class Object
trait Matchable
class Any
Known subtypes
class SettingKey[A1]
class TaskKey[A1]
final case class Select[S](s: S) extends ScopeAxis[S]

Select is a type constructor that is used to wrap type S to make a scope component, equivalent of Some in Option.

Select is a type constructor that is used to wrap type S to make a scope component, equivalent of Some in Option.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait ScopeAxis[S]
class Object
trait Matchable
class Any
sealed abstract class SettingKey[A1] extends ScopedTaskable[A1] with KeyedInitialize[A1] with ScopingSetting[SettingKey[A1]] with DefinableSetting[A1]

Identifies a setting. It consists of three parts: the scope, the name, and the type of a value associated with this key. The scope is represented by a value of type Scope. The name and the type are represented by a value of type AttributeKey[T]. Instances are constructed using the companion object.

Identifies a setting. It consists of three parts: the scope, the name, and the type of a value associated with this key. The scope is represented by a value of type Scope. The name and the type are represented by a value of type AttributeKey[T]. Instances are constructed using the companion object.

Attributes

Companion:
object
Graph
Supertypes
trait KeyedInitialize[A1]
trait Keyed[A1, A1]
trait Initialize[A1]
trait ScopedTaskable[A1]
trait Taskable[A1]
trait Scoped
trait Equals
class Object
trait Matchable
class Any
object SettingKey

Constructs SettingKeys, which are associated with a value to define a basic setting.

Constructs SettingKeys, which are associated with a value to define a basic setting.

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

SlashSyntax implements the slash syntax to scope keys for build.sbt DSL. The implicits are set up such that the order that the scope components must appear in the order of the project axis, the configuration axis, and the task axis. This ordering is the same as the shell syntax.

SlashSyntax implements the slash syntax to scope keys for build.sbt DSL. The implicits are set up such that the order that the scope components must appear in the order of the project axis, the configuration axis, and the task axis. This ordering is the same as the shell syntax.

Attributes

Example:
Global / cancelable := true
ThisBuild / scalaVersion := "2.12.2"
Test / test := ()
console / scalacOptions += "-deprecation"
Compile / console / scalacOptions += "-Ywarn-numeric-widen"
projA / Compile / console / scalacOptions += "-feature"
Zero / Zero / name := "foo"
Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class TaskKey[A1] extends ScopedTaskable[A1] with KeyedInitialize[Task[A1]] with ScopingSetting[TaskKey[A1]] with DefinableTask[A1]

Identifies a task. It consists of three parts: the scope, the name, and the type of the value computed by a task associated with this key. The scope is represented by a value of type Scope. The name and the type are represented by a value of type AttributeKey[Task[T]]. Instances are constructed using the companion object.

Identifies a task. It consists of three parts: the scope, the name, and the type of the value computed by a task associated with this key. The scope is represented by a value of type Scope. The name and the type are represented by a value of type AttributeKey[Task[T]]. Instances are constructed using the companion object.

Attributes

Companion:
object
Graph
Supertypes
trait DefinableTask[A1]
trait KeyedInitialize[Task[A1]]
trait Keyed[Task[A1], Task[A1]]
trait Initialize[Task[A1]]
trait ScopedTaskable[A1]
trait Taskable[A1]
trait Scoped
trait Equals
class Object
trait Matchable
class Any
object TaskKey

Constructs TaskKeys, which are associated with tasks to define a setting.

Constructs TaskKeys, which are associated with tasks to define a setting.

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
TaskKey.type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Def.type
sealed trait Taskable[A]

A SettingKey, TaskKey or Initialize[Task] that can be converted into an Initialize[Task].

A SettingKey, TaskKey or Initialize[Task] that can be converted into an Initialize[Task].

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SettingKey[A1]
class TaskKey[A1]

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait TaskableImplicits

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Taskable.type
Self type
case object This extends ScopeAxis[Nothing]

This is a scope component that represents not being scoped by the user, which later could be further scoped automatically by sbt.

This is a scope component that represents not being scoped by the user, which later could be further scoped automatically by sbt.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait ScopeAxis[Nothing]
class Object
trait Matchable
class Any
Self type
This.type
case object ThisBuild extends BuildReference

Identifies the build for the current context.

Identifies the build for the current context.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Reference
class Object
trait Matchable
class Any
Self type
case object ThisProject extends ProjectReference

Identifies the project for the current context.

Identifies the project for the current context.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Reference
class Object
trait Matchable
class Any
Self type

The sbt 0.10 style DSL was deprecated in 0.13.13, favouring the use of the '.value' macro.

The sbt 0.10 style DSL was deprecated in 0.13.13, favouring the use of the '.value' macro.

See https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#Migrating+from+sbt+0.12+style for how to migrate.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object TupleSyntax.type
object TupleSyntax extends TupleSyntax

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
class TupleWrap[Tup <: Tuple](value: Map[Tup, Taskable])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
case object Zero extends ScopeAxis[Nothing]

Zero is a scope component that represents not scoping. It is a universal fallback component that is strictly weaker than any other values on a scope axis.

Zero is a scope component that represents not scoping. It is a universal fallback component that is strictly weaker than any other values on a scope axis.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait ScopeAxis[Nothing]
class Object
trait Matchable
class Any
Self type
Zero.type
class sbtUnchecked extends Annotation

An annotation to designate that the annotated entity should not be considered for additional sbt compiler checks. These checks ensure that the DSL is predictable and prevents users from doing dangerous things at the cost of a stricter code structure.

An annotation to designate that the annotated entity should not be considered for additional sbt compiler checks. These checks ensure that the DSL is predictable and prevents users from doing dangerous things at the cost of a stricter code structure.

Attributes

Since:

1.0.0

Graph
Supertypes
class Annotation
class Object
trait Matchable
class Any