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
AutoPluginshould automatically be activated when all requirements are met, or should be opt-in. - Determine the
AutoPlugins that, when present (or absent), act as the requirements for theAutoPlugin. - Determine the settings/configurations to that the
AutoPlugininjects when activated. - Determine the keys and other names to be automatically imported to
*.sbtscripts.
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.sbtas 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
- 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
- Supertypes
-
class RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AutoPluginException.type
Uniquely identifies a build by a URI.
Uniquely identifies a build by a URI.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ResolvedReferencetrait BuildReferencetrait Referenceclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object Def
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ClasspathDependency
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait Project
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
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
- Supertypes
-
trait InitializeImplicitstrait Inittrait BuildSyntaxclass Objecttrait Matchableclass AnyShow all
- Self type
-
Def.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
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
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
KeyRanks.type
Identifies a project in the current build context.
Identifies a project in the current build context.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass AnyShow all
Identifies the root project in the current build context.
Identifies the root project in the current build context.
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass AnyShow all
- Self type
-
LocalRootProject.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
An expression that matches AutoPlugins.
An expression that matches AutoPlugins.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Basicclass AutoPlugin
Attributes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class AutoPluginobject Plugins
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Previous.type
Attributes
- Companion
- object
- Supertypes
Attributes
- 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
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
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
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ResolvedReferencetrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ProjectRef.type
Identifies a project.
Identifies a project.
Attributes
- Supertypes
- Known subtypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Identifies a project or build.
Identifies a project or build.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait BuildReferenceclass BuildRefobject ThisBuildtrait ProjectReferenceclass LocalProjectobject LocalRootProjectclass ProjectRefclass RootProjectobject ThisProjecttrait ResolvedReferenceShow all
Attributes
- Supertypes
A fully resolved, unique identifier for a project or build.
A fully resolved, unique identifier for a project or build.
Attributes
- 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
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
RootProject.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
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
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
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
- 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
- Supertypes
- Known subtypes
-
class SettingKey[A1]class TaskKey[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
- Supertypes
-
trait DefinableSetting[A1]trait KeyedInitialize[A1]trait Initialize[A1]trait ScopedTaskable[A1]trait Taskable[A1]trait Scopedtrait Equalsclass Objecttrait Matchableclass AnyShow all
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
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SettingKey.type
SlashSyntax implements part of the slash syntax to scope keys for build.sbt DSL.
SlashSyntax implements part of the slash syntax to scope keys for build.sbt DSL.
Attributes
- Example
-
Test / test := TestResult.Empty console.key / scalacOptions += "-deprecation" Compile / console / scalacOptions += "-Ywarn-numeric-widen" - Supertypes
-
class Objecttrait Matchableclass Any
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
- Supertypes
-
trait DefinableTask[A1]trait ScopedTaskable[A1]trait Taskable[A1]trait Scopedtrait Equalsclass Objecttrait Matchableclass AnyShow all
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
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
Identifies the build for the current context.
Identifies the build for the current context.
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait BuildReferencetrait Referenceclass Objecttrait Matchableclass AnyShow all
- Self type
-
ThisBuild.type
Identifies the project for the current context.
Identifies the project for the current context.
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ProjectReferencetrait Referenceclass Objecttrait Matchableclass AnyShow all
- 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
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object TupleSyntax
Attributes
- Companion
- trait
- Supertypes
- Self type
-
TupleSyntax.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
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
- Supertypes
-
class Annotationclass Objecttrait Matchableclass Any