class Ctx extends Dest with Log with api.Ctx.Args with Home with Env with Workspace

Represents the data and utilities that are contextually available inside the implementation of a Task.

Source
Ctx.scala
Linear Supertypes
Workspace, Env, Home, Ctx.Args, Log, Dest, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Ctx
  2. Workspace
  3. Env
  4. Home
  5. Args
  6. Log
  7. Dest
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Ctx(args: IndexedSeq[_], dest0: () => Path, log: Logger, home: Path, env: Map[String, String], reporter: (Int) => Option[CompileProblemReporter], testReporter: TestReporter, workspace: Path)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def arg[T](index: Int): T
  5. val args: IndexedSeq[_]
    Definition Classes
    CtxArgs
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def dest: Path

    T.dest is a unique os.Path (e.g.

    T.dest is a unique os.Path (e.g. out/classFiles.dest/ or out/run.dest/) that is assigned to every Target or Command. It is cleared before your task runs, and you can use it as a scratch space for temporary files or a place to put returned artifacts. This is guaranteed to be unique for every Target or Command, so you can be sure that you will not collide or interfere with anyone else writing to those same paths.

    Definition Classes
    CtxDest
  9. val env: Map[String, String]

    T.env is the environment variable map passed to the Mill command when it is run; typically used inside a T.input to ensure any changes in the env vars are properly detected.

    T.env is the environment variable map passed to the Mill command when it is run; typically used inside a T.input to ensure any changes in the env vars are properly detected.

    Note that you should not use sys.env, as Mill's long-lived server process means that sys.env variables may not be up to date.

    Definition Classes
    CtxEnv
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. val home: Path
    Definition Classes
    CtxHome
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val log: Logger

    T.log is the default logger provided for every task.

    T.log is the default logger provided for every task. While your task is running, System.out and System.in are also redirected to this logger. The logs for a task are streamed to standard out/error as you would expect, but each task's specific output is also streamed to a log file on disk, e.g. out/run.log or out/classFiles.log for you to inspect later.

    Messages logged with log.debug appear by default only in the log files. You can use the --debug option when running mill to show them on the console too.

    Definition Classes
    CtxLog
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. val reporter: (Int) => Option[CompileProblemReporter]
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. val testReporter: TestReporter
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. val workspace: 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 prefered 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).

    Definition Classes
    CtxWorkspace

Inherited from Workspace

Inherited from Env

Inherited from Home

Inherited from Ctx.Args

Inherited from Log

Inherited from Dest

Inherited from AnyRef

Inherited from Any

Ungrouped