mirror of https://github.com/sbt/sbt.git
parent
a7d76d357c
commit
75365e13d1
|
|
@ -33,6 +33,20 @@ trait UpperStateOps extends Any {
|
|||
|
||||
private[sbt] def currentUnit: LoadedBuildUnit
|
||||
|
||||
/**
|
||||
* Gets the value assigned to `key` in the computed settings map.
|
||||
* If the project axis is not explicitly specified, it is resolved to be the current project according to the extracted `session`.
|
||||
* Other axes are resolved to be `Zero` if they are not specified.
|
||||
*/
|
||||
def getSetting[A](key: SettingKey[A]): Option[A]
|
||||
|
||||
/**
|
||||
* Gets the value assigned to `key` in the computed settings map.
|
||||
* If the project axis is not explicitly specified, it is resolved to be the current project according to the extracted `session`.
|
||||
* Other axes are resolved to be `Zero` if they are not specified.
|
||||
*/
|
||||
def getTaskValue[A](key: TaskKey[A]): Option[Task[A]]
|
||||
|
||||
/**
|
||||
* Gets the value assigned to `key` in the computed settings map.
|
||||
* If the project axis is not explicitly specified, it is resolved to be the current project according to the extracted `session`.
|
||||
|
|
@ -111,6 +125,10 @@ object UpperStateOps {
|
|||
|
||||
private[sbt] def session: SessionSettings = Project.session(s)
|
||||
|
||||
def getSetting[A](key: SettingKey[A]): Option[A] = extract.getOpt(key)
|
||||
|
||||
def getTaskValue[A](key: TaskKey[A]): Option[Task[A]] = extract.getOpt(key)
|
||||
|
||||
def setting[A](key: SettingKey[A]): A = extract.get(key)
|
||||
|
||||
def taskValue[A](key: TaskKey[A]): Task[A] = extract.get(key)
|
||||
|
|
|
|||
Loading…
Reference in New Issue