Def

sbt.Def
object Def extends BuildSyntax, Init[Scope], InitializeImplicits

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

Attributes

Graph
Supertypes
trait Init[Scope]
trait BuildSyntax
class Object
trait Matchable
class Any
Show all
Self type
Def.type

Members list

Type members

Classlikes

final class InitOps[T](x: Initialize[T]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final class InitTaskOps[T](x: Initialize[Task[T]]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Inherited classlikes

final class Compiled[A1](val key: ScopedKey[A1], val dependencies: Iterable[ScopedKey[_]], val settings: Seq[Setting[A1]])

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any
final class Flattened(val key: ScopedKey[_], val dependencies: Iterable[ScopedKey[_]])

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any
object Initialize

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any
sealed trait Initialize[A1]

Abstractly defines a value of type A1.

Abstractly defines a value of type A1.

Specifically it defines a node in a task graph, where the dependencies represents dependent nodes, and evaluate represents the calculation based on the existing body of knowledge.

Type parameters

A1

the type of the value this defines.

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Keyed[S, A1]
trait KeyedInitialize[A1]
class ScopedKey[A]
trait InputKey[A1]
class SettingKey[A1]
class TaskKey[A1]
Show all
sealed trait Keyed[S, A1] extends Initialize[A1]

An Initialize[T] associated with a ScopedKey[S].

An Initialize[T] associated with a ScopedKey[S].

Type parameters

S

the type of the associated ScopedKey

T

the type of the value this Initialize defines.

Attributes

Inherited from:
Init
Supertypes
trait Initialize[A1]
class Object
trait Matchable
class Any
Known subtypes
trait KeyedInitialize[A1]
class ScopedKey[A]
trait InputKey[A1]
class SettingKey[A1]
class TaskKey[A1]
trait KeyedInitialize[A1] extends Keyed[A1, A1]

A Keyed where the type of the value and the associated ScopedKey are the same.

A Keyed where the type of the value and the associated ScopedKey are the same.

Type parameters

A1

the type of both the value this Initialize defines and the type of the associated ScopedKey.

Attributes

Inherited from:
Init
Supertypes
trait Keyed[A1, A1]
trait Initialize[A1]
class Object
trait Matchable
class Any
Known subtypes
class ScopedKey[A]
trait InputKey[A1]
class SettingKey[A1]
class TaskKey[A1]
final class RuntimeUndefined(val undefined: Seq[Undefined]) extends RuntimeException

Attributes

Inherited from:
Init
Supertypes
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
sealed case class ScopedKey[A](scope: ScopeType, key: AttributeKey[A]) extends KeyedInitialize[A]

Attributes

Inherited from:
Init
Supertypes
trait Serializable
trait Product
trait Equals
trait KeyedInitialize[A]
trait Keyed[A, A]
trait Initialize[A]
class Object
trait Matchable
class Any
Show all
sealed class Setting[A1] extends SettingsDefinition

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any
final class SettingList(val settings: Seq[Setting[_]]) extends SettingsDefinition

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any
sealed trait SettingsDefinition

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Setting[A1]
class SettingList
final class Undefined

Attributes

Inherited from:
Init
Supertypes
class Object
trait Matchable
class Any
final class Uninitialized(val undefined: Seq[Undefined], val toString: String) extends Exception

Attributes

Inherited from:
Init
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Types

type Classpath = Seq[Attributed[HashedVirtualFileRef]]

Inherited types

type CompiledMap = Map[ScopedKey[_], Compiled[_]]

Attributes

Inherited from:
Init
type MapConstant = [a] => (x$1: ScopedKey[a]) => Option[a]

Attributes

Inherited from:
Init
type MapScoped = [a] => (x$1: ScopedKey[a]) => ScopedKey[a]

Attributes

Inherited from:
Init
type ScopeLocal = ScopedKey[_] => Seq[Setting[_]]

Attributes

Inherited from:
Init
type ScopedMap = IMap[ScopedKey, SettingSeq]

Attributes

Inherited from:
Init
type SettingSeq[A] = Seq[Setting[A]]

Attributes

Inherited from:
Init
type ValidateRef = [a] => (x$1: ScopedKey[a]) => ValidatedRef[a]

Attributes

Inherited from:
Init
type ValidatedInit[A] = Either[Seq[Undefined], Initialize[A]]

Attributes

Inherited from:
Init
type ValidatedRef[A] = Either[Undefined, ScopedKey[A]]

Attributes

Inherited from:
Init

Value members

Concrete methods

inline def cachedTask[A1 : JsonFormat](inline a1: A1): Initialize[Task[A1]]
inline def declareOutput(inline vf: VirtualFile): VirtualFile
inline def declareOutputDirectory(inline vf: VirtualFileRef): VirtualFile
override def deriveAllowed[T](s: Setting[T], allowDynamic: Boolean): Option[String]

Attributes

Definition Classes
Init
def displayBuildRelative(currentBuild: URI, project: Reference): String
def displayFull(scoped: ScopedKey[_]): String
def displayFull(scoped: ScopedKey[_], keyNameColor: Option[String]): String
def displayMasked(scoped: ScopedKey[_], mask: ScopeMask): String
def displayMasked(scoped: ScopedKey[_], mask: ScopeMask, showZeroConfig: Boolean): String
def displayRelative2(current: ProjectRef, project: Reference): String
def displayRelativeReference(current: ProjectRef, project: Reference): String

Returns a String expression for the given Reference (BuildRef, ProjectRef, etc) relative to the current project.

Returns a String expression for the given Reference (BuildRef, ProjectRef, etc) relative to the current project.

Attributes

def ifS[A](x: Initialize[Task[Boolean]])(t: Initialize[Task[A]])(e: Initialize[Task[A]]): Initialize[Task[A]]
inline def input[A1](inline p: State => Parser[A1]): ParserGen[A1]
inline def inputTask[A1](inline a: A1): Initialize[InputTask[A1]]
override def intersect(s1: Scope, s2: Scope)(implicit delegates: Scope => Seq[Scope]): Option[Scope]

Intersects two scopes, returning the more specific one if they intersect, or None otherwise.

Intersects two scopes, returning the more specific one if they intersect, or None otherwise.

Attributes

Definition Classes
Init
def promise[A]: PromiseWrap[A]

Returns PromiseWrap[A], which is a wrapper around scala.concurrent.Promise. When a task is typed promise (e.g. Def.Initialize[Task[PromiseWrap[A]]]),an implicit method called await is injected which will run in a thread outside of concurrent restriction budget.

Returns PromiseWrap[A], which is a wrapper around scala.concurrent.Promise. When a task is typed promise (e.g. Def.Initialize[Task[PromiseWrap[A]]]),an implicit method called await is injected which will run in a thread outside of concurrent restriction budget.

Attributes

inline def setting[A1](inline a: A1): Initialize[A1]
inline def settingDyn[A1](inline a1: Initialize[A1]): Initialize[A1]
def settings(ss: SettingsDefinition*): Seq[Setting[_]]
def showBuildRelativeKey2(currentBuild: URI, keyNameColor: Option[String]): Show[ScopedKey[_]]
def showFullKey(keyNameColor: Option[String]): Show[ScopedKey[_]]
def showRelativeKey2(current: ProjectRef, keyNameColor: Option[String]): Show[ScopedKey[_]]
def spaceDelimited(argLabel: String): Parser[Seq[String]]

A default Parser for splitting input into space-separated arguments. argLabel is an optional, fixed label shown for an argument during tab completion.

A default Parser for splitting input into space-separated arguments. argLabel is an optional, fixed label shown for an argument during tab completion.

Attributes

inline def task[A1](inline a1: A1): Initialize[Task[A1]]
inline def taskDyn[A1](inline a1: Initialize[Task[A1]]): Initialize[Task[A1]]
inline def taskIf[A1](inline a: A1): Initialize[Task[A1]]
def toIParser[A1](p: Initialize[InputTask[A1]]): Initialize[State => Parser[Task[A1]]]
def toISParser[A1](p: Initialize[Parser[A1]]): Initialize[State => Parser[A1]]
def toITask[A1](i: Initialize[A1]): Initialize[Task[A1]]

Lifts the result of a setting initialization into a Task.

Lifts the result of a setting initialization into a Task.

Attributes

inline def toSParser[A1](p: Parser[A1]): State => Parser[A1]
def unit(a: Any): Unit

This works around Scala 2.12.12's "a pure expression does nothing in statement position"

This works around Scala 2.12.12's "a pure expression does nothing in statement position"

Def.unit(copyResources.value)
Def.unit(compile.value)

Attributes

def withColor(s: String, color: Option[String]): String
def withColor(s: String, color: Option[String], useColor: Boolean): String

Deprecated methods

def displayBuildRelative(currentBuild: URI, multi: Boolean, project: Reference): String

Attributes

Deprecated
true
def displayRelative(current: ProjectRef, multi: Boolean, project: Reference): String

Attributes

Deprecated
true
def showBuildRelativeKey(currentBuild: URI, multi: Boolean, keyNameColor: Option[String]): Show[ScopedKey[_]]

Attributes

Deprecated
true
def showRelativeKey(current: ProjectRef, multi: Boolean, keyNameColor: Option[String]): Show[ScopedKey[_]]

Attributes

Deprecated
true

Inherited methods

def Undefined(defining: Setting[_], referencedKey: ScopedKey[_]): Undefined

Attributes

Inherited from:
Init
def Uninitialized(validKeys: Seq[ScopedKey[_]], delegates: Scope => Seq[Scope], keys: Seq[Undefined], runtime: Boolean)(implicit display: Show[ScopedKey[_]]): Uninitialized

Attributes

Inherited from:
Init
def add[A1](m: ScopedMap, s: Setting[A1]): ScopedMap

Attributes

Inherited from:
Init
def addLocal(init: Seq[Setting[_]])(implicit scopeLocal: ScopeLocal): Seq[Setting[_]]

Attributes

Inherited from:
Init
def ap[A1, A2](ff: Initialize[A1 => A2])(in: Initialize[A1]): Initialize[A2]

Attributes

Inherited from:
Init
def app[Tup <: Tuple, A2](inputs: Map[Tup, Initialize])(f: Tup => A2): Initialize[A2]

Attributes

Inherited from:
Init
def append[A1](ss: Seq[Setting[A1]], s: Setting[A1]): Seq[Setting[A1]]

Attributes

Inherited from:
Init
def asFunction[A](s: Settings[Scope]): ScopedKey[A] => A

Attributes

Inherited from:
Init
def asTransform(s: Settings[Scope]): [A] => (x$1: ScopedKey[A]) => A

Attributes

Inherited from:
Init
def compile(sMap: ScopedMap): CompiledMap

Attributes

Inherited from:
Init
def compiled(init: Seq[Setting[_]], actual: Boolean)(using delegates: Scope => Seq[Scope], scopeLocal: ScopeLocal, display: Show[ScopedKey[_]]): CompiledMap

Attributes

Inherited from:
Init
def definedAtString(settings: Seq[Setting[_]]): String

Attributes

Inherited from:
Init
def delegate(sMap: ScopedMap)(implicit delegates: Scope => Seq[Scope], display: Show[ScopedKey[_]]): ScopedMap

Attributes

Inherited from:
Init
final def derive[A1](s: Setting[A1], allowDynamic: Boolean, filter: Scope => Boolean, trigger: AttributeKey[_] => Boolean, default: Boolean): Setting[A1]

Constructs a derived setting that will be automatically defined in every scope where one of its dependencies is explicitly defined and the where the scope matches filter. A setting initialized with dynamic dependencies is only allowed if allowDynamic is true. Only the static dependencies are tracked, however. Dependencies on previous values do not introduce a derived setting either.

Constructs a derived setting that will be automatically defined in every scope where one of its dependencies is explicitly defined and the where the scope matches filter. A setting initialized with dynamic dependencies is only allowed if allowDynamic is true. Only the static dependencies are tracked, however. Dependencies on previous values do not introduce a derived setting either.

Attributes

Inherited from:
Init
def empty(implicit delegates: Scope => Seq[Scope]): Settings[ScopeType]

Attributes

Inherited from:
Init
def flatMap[A1, A2](in: Initialize[A1])(f: A1 => Initialize[A2]): Initialize[A2]

Attributes

Inherited from:
Init
def flattenLocals(compiled: CompiledMap): Map[ScopedKey[_], Flattened]

Attributes

Inherited from:
Init
def getValue[T](s: Settings[Scope], k: ScopedKey[T]): T

Attributes

Inherited from:
Init
def grouped(init: Seq[Setting[_]]): ScopedMap

Attributes

Inherited from:
Init
def guessIntendedScope(validKeys: Seq[ScopedKey[_]], delegates: Scope => Seq[Scope], key: ScopedKey[_]): Option[ScopedKey[_]]

Attributes

Inherited from:
Init
inline def inputKey[A1](inline description: String): InputKey[A1]

Attributes

Inherited from:
BuildSyntax
def makeWithCompiledMap(init: Seq[Setting[_]])(using delegates: Scope => Seq[Scope], scopeLocal: ScopeLocal, display: Show[ScopedKey[_]]): (CompiledMap, Settings[ScopeType])

Attributes

Inherited from:
Init
def mapScope(f: Scope => Scope): MapScoped

Attributes

Inherited from:
Init
def optional[A1, A2](i: Initialize[A1])(f: Option[A1] => A2): Initialize[A2]

Attributes

Inherited from:
Init
def pure[A1](value: () => A1): Initialize[A1]

Attributes

Inherited from:
Init
def refinedDistance(delegates: Scope => Seq[Scope], a: ScopedKey[_], b: ScopedKey[_]): Option[Int]

Attributes

Inherited from:
Init
def setting[A1](key: ScopedKey[A1], init: Initialize[A1], pos: SourcePosition): Setting[A1]

Attributes

Inherited from:
Init
inline def settingKey[A1](inline description: String): SettingKey[A1]

Attributes

Inherited from:
BuildSyntax
def showUndefined(u: Undefined, validKeys: Seq[ScopedKey[_]], delegates: Scope => Seq[Scope])(implicit display: Show[ScopedKey[_]]): String

Attributes

Inherited from:
Init
def sort(cMap: CompiledMap): Seq[Compiled[_]]

Attributes

Inherited from:
Init
inline def taskKey[A1](inline description: String): TaskKey[A1]

Attributes

Inherited from:
BuildSyntax
def uniform[A1, A2](inputs: Seq[Initialize[A1]])(f: Seq[A1] => A2): Initialize[A2]

Attributes

Inherited from:
Init
def update[A1](key: ScopedKey[A1])(f: A1 => A1): Setting[A1]

Attributes

Inherited from:
Init
def value[A1](value: => A1): Initialize[A1]

Attributes

Inherited from:
Init
def valueStrict[A1](value: A1): Initialize[A1]

Attributes

Inherited from:
Init

Deprecated and Inherited methods

def make(init: Seq[Setting[_]])(using delegates: Scope => Seq[Scope], scopeLocal: ScopeLocal, display: Show[ScopedKey[_]]): Settings[ScopeType]

Attributes

Deprecated
true
Inherited from:
Init

Concrete fields

val cacheConfiguration: Initialize[Task[BuildWideCacheConfiguration]]
val onComplete: SettingKey[() => Unit]
val runBefore: AttributeKey[Seq[Task[_]]]
lazy val showFullKey: Show[ScopedKey[_]]

The Show instance used when a detailed String needs to be generated. It is typically used when no context is available.

The Show instance used when a detailed String needs to be generated. It is typically used when no context is available.

Attributes

val triggeredBy: AttributeKey[Seq[Task[_]]]

Inherited fields

lazy val capturedTransformations: Initialize[[x] => (x$1: Initialize[x]) => Initialize[x]]

The result of this initialization is the composition of applied transformations. This can be useful when dealing with dynamic Initialize values.

The result of this initialization is the composition of applied transformations. This can be useful when dealing with dynamic Initialize values.

Attributes

Inherited from:
Init

Extensions

Extensions

extension [A1](inline in: Initialize[A1])
inline def value: A1
extension [A1](inline in: Initialize[Task[A1]])
inline def flatMapTask[A2](f: A1 => Initialize[Task[A2]]): Initialize[Task[A2]]
inline def taskValue: Task[A1]

This treats the Initialize[Task[A]] as a setting that returns the Task value, instead of evaluating the task.

This treats the Initialize[Task[A]] as a setting that returns the Task value, instead of evaluating the task.

Attributes

inline def value: A1
extension [A1](inline in: TaskKey[A1])
inline def previous(using JsonFormat[A1]): Option[A1]
extension [A1](inline in: Initialize[Parser[A1]])
inline def parsed: A1
extension [A1](inline in: Initialize[State => Parser[A1]])
inline def parsed: A1
extension [A1](inline in: Initialize[InputTask[A1]])
inline def evaluated: A1
inline def parsed: Task[A1]
inline def toTask(arg: String): Initialize[Task[A1]]

Inherited extensions

extension (f: [x] => (x$1: Initialize[x]) => Initialize[x])
def (g: [x] => (x$1: Initialize[x]) => Initialize[x]): [x] => (x$1: Initialize[x]) => Initialize[x]

Attributes

Inherited from:
Init
extension (f: [x] => (x$1: ValidatedInit[x]) => Initialize[x])
def composeVI(g: [x] => (x$1: Initialize[x]) => ValidatedInit[x]): [x] => (x$1: Initialize[x]) => Initialize[x]

Attributes

Inherited from:
Init
extension [A1](inline in: Task[A1])
inline def value: A1

Attributes

Inherited from:
BuildSyntax
extension [A1](inline in: Parser[A1])
inline def parsed: A1

Attributes

Inherited from:
BuildSyntax
extension [A1](inline in: State => Parser[A1])
inline def parsed: A1

Attributes

Inherited from:
BuildSyntax

Implicits

Inherited implicits

implicit def initOps[T](x: Initialize[T]): InitOps[T]

Attributes

Inherited from:
InitializeImplicits
implicit def initTaskOps[T](x: Initialize[Task[T]]): InitTaskOps[T]

Attributes

Inherited from:
InitializeImplicits