diff --git a/Server---Build-level-API.md b/Server---Build-level-API.md new file mode 100644 index 0000000..de57194 --- /dev/null +++ b/Server---Build-level-API.md @@ -0,0 +1,31 @@ +The server aspects to sbt build will be exposed to build/plugin authors as follows: + + +1. A new key available which can be used to interact with the server: + +```scala +val uiContext = taskKey[sbt.UIContext]("All user interaction should be driven through this interface.") +``` + +2. A new interface: + +```scala +package sbt +trait UIContext { + + /** Prompts the user for input, optionally with a mask for characters. */ + def readLine(prompt: String, mask: Option[Char] = None): Option[String] + + /** Sends an event out to all registered event listeners. */ + def sendEvent[T: Format](event: T): Unit +} +``` + +3. An addition to plugin API: +```scala +trait Plugin { + def serializers: Seq[(AttributeKey[_], Format[_])] = Nil +} +``` + +# TODO - More information about the changes... \ No newline at end of file