BuildCtx

mill.api.BuildCtx
object BuildCtx

BuildCtx contains APIs that are global throughout an entire build, without being tied to any particular task or module

Attributes

Source
BuildCtx.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
BuildCtx.type

Members list

Value members

Concrete methods

def evalWatch(p: Path): Path

Attributes

Source
BuildCtx.scala
def evalWatch0(w: Watchable): Unit

Attributes

Source
BuildCtx.scala
def watch(p: Path): Path

Attributes

Source
BuildCtx.scala
def watch0(w: Watchable): Unit

Attributes

Source
BuildCtx.scala
def watchValue[T](v0: => T)(using fn: FileName, ln: Line): T

Register a compute value as watched during module initialization, so Mill knows that if the value changes during --watch the module needs to be re-instantiated.

Register a compute value as watched during module initialization, so Mill knows that if the value changes during --watch the module needs to be re-instantiated.

Attributes

Source
BuildCtx.scala
def withFilesystemCheckerDisabled[T](block: => T): T

Disable Mill's filesystem read/write checker, which normally enforces best practices about what code or tasks are able to read and write to what locations on disk.

Disable Mill's filesystem read/write checker, which normally enforces best practices about what code or tasks are able to read and write to what locations on disk.

Attributes

Source
BuildCtx.scala
def workspaceRoot: Path

This is the os.Path pointing to the project root directory.

This is the os.Path pointing to the project root directory.

This is the preferred access to the project directory, and should always be preferred over os.pwd* (which might also point to the project directory in classic cli scenarios, but might not in other use cases like BSP or LSP server usage).

Attributes

Source
BuildCtx.scala