sbt
Members list
Type members
Classlikes
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:
- Determine if the
AutoPlugin
should automatically be activated when all requirements are met, or should be opt-in. - Determine the
AutoPlugin
s that, when present (or absent), act as the requirements for theAutoPlugin
. - Determine the settings/configurations to that the
AutoPlugin
injects when activated. - 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:
- Add dependencies on plugins in
project/plugins.sbt
as usual withaddSbtPlugin
- Add key plugins to projects, which will automatically select the plugin + dependent plugin settings to add for those projects.
- 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
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 RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- AutoPluginException.type
Uniquely identifies a build by a URI.
Uniquely identifies a build by a URI.
Attributes
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalstrait ResolvedReferencetrait BuildReferencetrait Referenceclass Objecttrait Matchableclass Any
Attributes
- Graph
- Supertypes
- trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait Project
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
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 InitializeImplicitstrait InitializeImplicits0trait TaskMacroExtratrait Init[Scope]class Objecttrait Matchableclass Any
- Self type
- Def.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait InitializeImplicitsobject Def.type
- Self type
- Def.type
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
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 Objecttrait Matchableclass Any
Identifies a project in the current build context.
Identifies a project in the current build context.
Attributes
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalstrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass Any
Identifies the root project in the current build context.
Identifies the root project in the current build context.
Attributes
- Graph
- Supertypes
- trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass Any
- Self type
- LocalRootProject.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Graph
- Supertypes
- trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
An expression that matches AutoPlugin
s.
An expression that matches AutoPlugin
s.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- class Basicclass AutoPlugin
Attributes
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- class AutoPluginobject Plugins.type
Attributes
- Companion:
- object
- Graph
- Supertypes
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait Projecttrait ResolvedProject
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 Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
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 Serializabletrait Producttrait Equalstrait ResolvedReferencetrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- ProjectRef.type
Identifies a project.
Identifies a project.
Attributes
- Graph
- Supertypes
- Known subtypes
- class LocalProjectobject LocalRootProject.typeclass ProjectRefclass RootProjectobject ThisProject.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Identifies a project or build.
Identifies a project or build.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait BuildReferenceclass BuildRefobject ThisBuild.typetrait ProjectReferenceclass LocalProjectobject LocalRootProject.typeclass ProjectRefclass RootProjectobject ThisProject.typetrait ResolvedReference
Attributes
- Graph
- Supertypes
A fully resolved, unique identifier for a project or build.
A fully resolved, unique identifier for a project or build.
Attributes
- Graph
- Supertypes
- Known subtypes
- class BuildRefclass ProjectRef
Identifies the root project in the specified build.
Identifies the root project in the specified build.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalstrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- RootProject.type
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
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 Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
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 Equalsclass Objecttrait Matchableclass Any
- Known subtypes
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
- Known subtypes
- class SettingKey[A1]class TaskKey[A1]
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
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 DefinableSetting[A1]trait KeyedInitialize[A1]trait Initialize[A1]trait ScopedTaskable[A1]trait Taskable[A1]trait Scopedtrait Equalsclass Objecttrait Matchableclass Any
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 Objecttrait Matchableclass Any
- Self type
- SettingKey.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 Objecttrait Matchableclass Any
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- SlashSyntax.type
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 ScopedTaskable[A1]trait Taskable[A1]trait Scopedtrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- object Def.type
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 Objecttrait Matchableclass Any
- Known subtypes
Attributes
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
Identifies the build for the current context.
Identifies the build for the current context.
Attributes
- Graph
- Supertypes
- trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait BuildReferencetrait Referenceclass Objecttrait Matchableclass Any
- Self type
- ThisBuild.type
Identifies the project for the current context.
Identifies the project for the current context.
Attributes
- Graph
- Supertypes
- trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass Any
- Self type
- ThisProject.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 Objecttrait Matchableclass Any
- Known subtypes
- object TupleSyntax.type
Attributes
- Companion:
- trait
- Graph
- Supertypes
- Self type
- TupleSyntax.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
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
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 Annotationclass Objecttrait Matchableclass Any