mill.define

package mill.define

Members list

Packages

Type members

Classlikes

class AnonImpl[T](val inputs: Seq[Task[_]], evaluate0: (Seq[Any], TaskCtx) => Result[T]) extends Task[T]

Attributes

Source
Task.scala
Supertypes
class Task[T]
trait TaskApi[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
@Scaladoc(value = "/**\n * Represents an unstructured sequence of command-line arguments that can be\n * passed to Mill commands; similar to `mainargs.Leftover`.\n */")
class Args(val value: Seq[String])

Represents an unstructured sequence of command-line arguments that can be passed to Mill commands; similar to mainargs.Leftover.

Represents an unstructured sequence of command-line arguments that can be passed to Mill commands; similar to mainargs.Leftover.

Attributes

Companion
object
Source
Args.scala
Supertypes
class Object
trait Matchable
class Any
object Args

Attributes

Companion
class
Source
Args.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Args.type
@Scaladoc(value = "/**\n * Represents a module at the root of a module tree. This can either be a\n * `mill.define.RootModule` representing the `build.mill` file, or a\n * `mill.define.ExternalModule` provided by a library.\n */")
abstract class BaseModule(millSourcePath0: Path, external0: Boolean)(implicit millModuleEnclosing0: Enclosing, millModuleLine0: Line, millFile0: File) extends BaseClass, Module, BaseModuleApi

Represents a module at the root of a module tree. This can either be a mill.define.RootModule representing the build.mill file, or a mill.define.ExternalModule provided by a library.

Represents a module at the root of a module tree. This can either be a mill.define.RootModule representing the build.mill file, or a mill.define.ExternalModule provided by a library.

Attributes

Source
BaseModule.scala
Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
class Command[+T](val inputs: Seq[Task[Any]], val evaluate0: (Seq[Any], TaskCtx) => Result[T], val ctx0: ModuleCtx, val writer: Writer[_], val isPrivate: Option[Boolean], val exclusive: Boolean) extends NamedTask[T]

Attributes

Source
Task.scala
Supertypes
trait NamedTask[T]
trait NamedTaskApi[T]
class Task[T]
trait TaskApi[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
object Cross

Attributes

Companion
trait
Source
Cross.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Cross.type
@Scaladoc(value = "/**\n * Models \"cross-builds\": sets of duplicate builds which differ only in the\n * value of one or more \"case\" variables whose values are determined at runtime.\n * Used via:\n *\n * {{{\n * object foo extends Cross[FooModule](\"bar\", \"baz\", \"qux\")\n * trait FooModule extends Cross.Module[String]{\n * ... crossValue ...\n * }\n * }}}\n */")
trait Cross[M <: Module[_]](factories: Factory[M]*) extends Module

Models "cross-builds": sets of duplicate builds which differ only in the value of one or more "case" variables whose values are determined at runtime. Used via:

Models "cross-builds": sets of duplicate builds which differ only in the value of one or more "case" variables whose values are determined at runtime. Used via:

object foo extends Cross[FooModule]("bar", "baz", "qux")
trait FooModule extends Cross.Module[String]{
 ... crossValue ...
}

Attributes

Companion
object
Source
Cross.scala
Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
sealed trait CrossVersion

Attributes

Companion
object
Source
CrossVersion.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Binary
class Constant
class Full
object CrossVersion

Attributes

Companion
trait
Source
CrossVersion.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
@Scaladoc(value = "/**\n * Macro to walk the module tree and generate `mainargs` entrypoints for any\n * `Task.Command` methods that it finds.\n *\n * Note that unlike the rest of Mill\'s module-handling logic which uses Java\n * reflection, generation of entrypoints requires typeclass resolution, and so\n * needs to be done at compile time. Thus, we walk the entire module tree,\n * collecting all the module `Class[_]`s we can find, and for each one generate\n * the `mainargs.MainData` containing metadata and resolved typeclasses for all\n * the `Task.Command` methods we find. This mapping from `Class[_]` to `MainData`\n * can then be used later to look up the `MainData` for any module.\n */")
class Discover(val classInfo: Map[Class[_], ClassInfo])

Macro to walk the module tree and generate mainargs entrypoints for any Task.Command methods that it finds.

Macro to walk the module tree and generate mainargs entrypoints for any Task.Command methods that it finds.

Note that unlike the rest of Mill's module-handling logic which uses Java reflection, generation of entrypoints requires typeclass resolution, and so needs to be done at compile time. Thus, we walk the entire module tree, collecting all the module Class[_]s we can find, and for each one generate the mainargs.MainData containing metadata and resolved typeclasses for all the Task.Command methods we find. This mapping from Class[_] to MainData can then be used later to look up the MainData for any module.

Attributes

Companion
object
Source
Discover.scala
Supertypes
class Object
trait Matchable
class Any
object Discover

Attributes

Companion
class
Source
Discover.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Discover.type
@Scaladoc(value = "/**\n * A module which you can override [[moduleDirectChildren]] to dynamically\n * enable or disable child modules at runtime\n */")
trait DynamicModule extends Module

A module which you can override moduleDirectChildren to dynamically enable or disable child modules at runtime

A module which you can override moduleDirectChildren to dynamically enable or disable child modules at runtime

Attributes

Source
DynamicModule.scala
Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
@Scaladoc(value = "/**\n * An implicit that provides the lexically-enclosing class\n * at the point at which it is resolved\n */")
case class EnclosingClass(value: Class[_])

An implicit that provides the lexically-enclosing class at the point at which it is resolved

An implicit that provides the lexically-enclosing class at the point at which it is resolved

Attributes

Companion
object
Source
EnclosingClass.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
EnclosingClass.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Evaluator extends AutoCloseable, EvaluatorApi

Attributes

Companion
object
Source
Evaluator.scala
Supertypes
trait EvaluatorApi
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes
object Evaluator

Attributes

Companion
trait
Source
Evaluator.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Evaluator.type
final class EvaluatorProxy(delegate: => Evaluator) extends Evaluator

Attributes

Source
EvaluatorProxy.scala
Supertypes
trait Evaluator
trait EvaluatorApi
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
case class ExecutionPaths

Attributes

Companion
object
Source
ExecutionPaths.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ExecutionPaths.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Source
ExecutionResults.scala
Supertypes
class Object
trait Matchable
class Any
@Scaladoc(value = "/**\n * A module defined outside of the `build.mill` file, and is instead\n * provided builtin by some Mill library or plugin\n *\n * Implementors should make sure, the final override of [[millDiscover]] happens in the final object.\n * {{{\n * override protected def millDiscover: Discover = Discover[this.type]\n * }}}\n */")
abstract class ExternalModule(implicit millModuleEnclosing0: Enclosing, millModuleLine0: Line, millFile0: File) extends BaseModule

A module defined outside of the build.mill file, and is instead provided builtin by some Mill library or plugin

A module defined outside of the build.mill file, and is instead provided builtin by some Mill library or plugin

Implementors should make sure, the final override of millDiscover happens in the final object.

  override protected def millDiscover: Discover = Discover[this.type]

Attributes

Companion
object
Source
ExternalModule.scala
Supertypes
class BaseModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Companion
class
Source
ExternalModule.scala
Supertypes
class Object
trait Matchable
class Any
Self type
class InputImpl[T](val evaluate0: (Seq[Any], TaskCtx) => Result[T], val ctx0: ModuleCtx, val writer: Writer[_], val isPrivate: Option[Boolean]) extends Target[T]

Attributes

Source
Task.scala
Supertypes
trait Target[T]
trait NamedTask[T]
trait NamedTaskApi[T]
class Task[T]
trait TaskApi[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
class SourceImpl
class SourcesImpl

Attributes

Companion
trait
Source
JsonFormatters.scala
Supertypes
class Object
trait Matchable
class Any
Self type
@Scaladoc(value = "/**\n * Defines various default JSON formatters used in mill.\n */")

Defines various default JSON formatters used in mill.

Defines various default JSON formatters used in mill.

Attributes

Companion
object
Source
JsonFormatters.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final class Lazy[T](t: () => T)

Attributes

Source
Lazy.scala
Supertypes
class Object
trait Matchable
class Any
trait LowPriCtx

Attributes

Source
ModuleCtx.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ModuleCtx
object Mirrors

Attributes

Source
Mirrors.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Mirrors.type
@Scaladoc(value = "/**\n * Represents a namespace within the Mill build hierarchy, containing nested\n * modules or tasks.\n *\n * `Module` is a class meant to be extended by ``trait``s *only*, in order to\n * propagate the implicit parameters forward to the final concrete\n * instantiation site so they can capture the enclosing/line information of\n * the concrete instance.\n */")
trait Module extends BaseClass, Wrapper, ModuleApi

Represents a namespace within the Mill build hierarchy, containing nested modules or tasks.

Represents a namespace within the Mill build hierarchy, containing nested modules or tasks.

Module is a class meant to be extended by traits only, in order to propagate the implicit parameters forward to the final concrete instantiation site so they can capture the enclosing/line information of the concrete instance.

Attributes

Companion
object
Source
Module.scala
Supertypes
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
class BaseModule
object Kover
object KtfmtModule
object KtlintModule
object VcsVersion
object Giter8Module
object Dependency
object PublishModule
class RootModule0
trait MainModule
trait Module[T1]
trait CrossValue
trait Module2[T1, T2]
trait Module3[T1, T2, T3]
trait Module4[T1, T2, T3, T4]
trait Module5[T1, T2, T3, T4, T5]
trait Cross[M]
trait TaskModule
trait JavaModule
trait JavaTests
trait KotlinTests
trait KotestTests
trait KspTests
trait MavenTests
trait SbtTests
trait ScalaTests
trait ScalaJSTests
trait KtfmtModule
trait KotlinModule
trait DetektModule
trait KoverModule
trait KspModule
trait BomModule
trait JlinkModule
trait MavenModule
trait SbtModule
trait ScalaModule
trait UnidocModule
trait TestModule
trait Junit4
trait Junit5
trait Munit
trait ScalaCheck
trait ScalaTest
trait Specs2
trait TestNg
trait Utest
trait Weaver
trait ZioTest
trait BspModule
object kover
trait Giter8Module
trait RunModule
Show all
object Module

Attributes

Companion
trait
Source
Module.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Module.type
@Scaladoc(value = "/**\n * The contextual information provided to a [[mill.define.Module]] or [[mill.define.Task]]\n */")
trait ModuleCtx extends Nested

The contextual information provided to a mill.define.Module or mill.define.Task

The contextual information provided to a mill.define.Module or mill.define.Task

Attributes

Companion
object
Source
ModuleCtx.scala
Supertypes
trait Nested
class Object
trait Matchable
class Any
object ModuleCtx extends LowPriCtx

Attributes

Companion
trait
Source
ModuleCtx.scala
Supertypes
trait LowPriCtx
class Object
trait Matchable
class Any
Self type
ModuleCtx.type
@Scaladoc(value = "/**\n * Used to refer to a module from another module without including the target\n * module as a child-module of the first.\n */")
case class ModuleRef[+T <: Module](t: T)

Used to refer to a module from another module without including the target module as a child-module of the first.

Used to refer to a module from another module without including the target module as a child-module of the first.

Attributes

Source
ModuleRef.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
@Scaladoc(value = "/**\n * Represents a task that can be referenced by its path segments. `Task{...}`\n * targets, `Task.Input`, `Task.Worker`, etc. but not including anonymous\n * `Task.Anon` or `Task.traverse` etc. instances\n */")
trait NamedTask[+T] extends Task[T], NamedTaskApi[T]

Represents a task that can be referenced by its path segments. Task{...} targets, Task.Input, Task.Worker, etc. but not including anonymous Task.Anon or Task.traverse etc. instances

Represents a task that can be referenced by its path segments. Task{...} targets, Task.Input, Task.Worker, etc. but not including anonymous Task.Anon or Task.traverse etc. instances

Attributes

Source
Task.scala
Supertypes
trait NamedTaskApi[T]
class Task[T]
trait TaskApi[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
class Command[T]
trait Target[T]
class InputImpl[T]
class SourceImpl
class SourcesImpl
class TargetImpl[T]
class Worker[T]
Show all
@Scaladoc(value = "/**\n * A wrapper around `os.Path` that calculates it\'s hashcode based\n * on the contents of the filesystem underneath it. Used to ensure filesystem\n * changes can bust caches which are keyed off hashcodes.\n */")
case class PathRef

A wrapper around os.Path that calculates it's hashcode based on the contents of the filesystem underneath it. Used to ensure filesystem changes can bust caches which are keyed off hashcodes.

A wrapper around os.Path that calculates it's hashcode based on the contents of the filesystem underneath it. Used to ensure filesystem changes can bust caches which are keyed off hashcodes.

Attributes

Companion
object
Source
PathRef.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PathRef

Attributes

Companion
class
Source
PathRef.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
PathRef.type
@Scaladoc(value = "/**\n * Used to mark a module in your `build.mill` as a top-level module, so it\'s\n * tasks can be run directly e.g. via `mill run` rather than\n * prefixed by the module name `mill foo.run`.\n *\n * Only one top-level module may be defined in your `build.mill`, and it must be\n * defined at the top level of the `build.mill` and not nested in any other\n * modules.\n */")
abstract class RootModule0()(implicit baseModuleInfo: Info, millModuleEnclosing0: Enclosing, millModuleLine0: Line, millFile0: File) extends BaseModule, RootModuleApi

Used to mark a module in your build.mill as a top-level module, so it's tasks can be run directly e.g. via mill run rather than prefixed by the module name mill foo.run.

Used to mark a module in your build.mill as a top-level module, so it's tasks can be run directly e.g. via mill run rather than prefixed by the module name mill foo.run.

Only one top-level module may be defined in your build.mill, and it must be defined at the top level of the build.mill and not nested in any other modules.

Attributes

Companion
object
Source
RootModule0.scala
Supertypes
class BaseModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
object RootModule0

Attributes

Companion
class
Source
RootModule0.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Source
SelectiveExecution.scala
Supertypes
class Object
trait Matchable
class Any
Self type
class SourceImpl(evaluate0: (Seq[Any], TaskCtx) => Result[PathRef], ctx0: ModuleCtx, isPrivate: Option[Boolean]) extends InputImpl[PathRef]

Attributes

Source
Task.scala
Supertypes
trait Target[PathRef]
class Task[PathRef]
trait TaskApi[PathRef]
class Ops[PathRef]
class Object
trait Matchable
class Any
Show all
class SourcesImpl(evaluate0: (Seq[Any], TaskCtx) => Result[Seq[PathRef]], ctx0: ModuleCtx, isPrivate: Option[Boolean]) extends InputImpl[Seq[PathRef]]

Attributes

Source
Task.scala
Supertypes
class InputImpl[Seq[PathRef]]
trait Target[Seq[PathRef]]
trait NamedTask[Seq[PathRef]]
trait NamedTaskApi[Seq[PathRef]]
class Task[Seq[PathRef]]
trait TaskApi[Seq[PathRef]]
trait Applyable[Task, Seq[PathRef]]
class Ops[Seq[PathRef]]
class Object
trait Matchable
class Any
Show all
object SystemStreams

Attributes

Source
SystemStreams.scala
Supertypes
class Object
trait Matchable
class Any
Self type
@Scaladoc(value = "/**\n * A Target is a [[NamedTask]] that is cached on disk; either a\n * [[TargetImpl]] or an [[InputImpl]]\n */")
trait Target[+T] extends NamedTask[T]

A Target is a NamedTask that is cached on disk; either a TargetImpl or an InputImpl

A Target is a NamedTask that is cached on disk; either a TargetImpl or an InputImpl

Attributes

Companion
object
Source
Task.scala
Supertypes
trait NamedTask[T]
trait NamedTaskApi[T]
class Task[T]
trait TaskApi[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
class InputImpl[T]
class SourceImpl
class SourcesImpl
class TargetImpl[T]
object Target extends TaskBase

Attributes

Companion
trait
Source
Task.scala
Supertypes
class TaskBase
class Object
trait Matchable
class Any
Self type
Target.type
class TargetImpl[+T](val inputs: Seq[Task[Any]], val evaluate0: (Seq[Any], TaskCtx) => Result[T], val ctx0: ModuleCtx, val readWriter: ReadWriter[_], val isPrivate: Option[Boolean], val persistent: Boolean) extends Target[T]

Attributes

Source
Task.scala
Supertypes
trait Target[T]
trait NamedTask[T]
trait NamedTaskApi[T]
class Task[T]
trait TaskApi[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
@Scaladoc(value = "/**\n * Models a single node in the Mill build graph, with a list of inputs and a\n * single output of type [[T]].\n *\n * Generally not instantiated manually, but instead constructed via the\n * [[Target.apply]] & similar macros.\n */")
sealed abstract class Task[+T] extends Ops[T], Applyable[Task, T], TaskApi[T]

Models a single node in the Mill build graph, with a list of inputs and a single output of type T.

Models a single node in the Mill build graph, with a list of inputs and a single output of type T.

Generally not instantiated manually, but instead constructed via the Target.apply & similar macros.

Attributes

Companion
object
Source
Task.scala
Supertypes
trait TaskApi[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
class AnonImpl[T]
trait NamedTask[T]
class Command[T]
trait Target[T]
class InputImpl[T]
class SourceImpl
class SourcesImpl
class TargetImpl[T]
class Worker[T]
Show all
object Task extends TaskBase

Attributes

Companion
class
Source
Task.scala
Supertypes
class TaskBase
class Object
trait Matchable
class Any
Self type
Task.type
@Scaladoc(value = "/**\n * The [[mill.define.Target]] companion object, usually aliased as [[T]],\n * provides most of the helper methods and macros used to build task graphs.\n * methods like `Task.`[[apply]], `Task.`[[sources]], `Task.`[[command]] allow you to\n * define the tasks, while methods like `Task.`[[dest]], `Task.`[[log]] or\n * `Task.`[[env]] provide the core APIs that are provided to a task implementation\n */")
class TaskBase

The mill.define.Target companion object, usually aliased as T, provides most of the helper methods and macros used to build task graphs. methods like Task.apply, Task.sources, Task.command allow you to define the tasks, while methods like Task.dest, Task.log or Task.env provide the core APIs that are provided to a task implementation

The mill.define.Target companion object, usually aliased as T, provides most of the helper methods and macros used to build task graphs. methods like Task.apply, Task.sources, Task.command allow you to define the tasks, while methods like Task.dest, Task.log or Task.env provide the core APIs that are provided to a task implementation

Attributes

Source
Task.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Target
object Task
@Scaladoc(value = "/**\n * Represents the data and utilities that are contextually available inside the\n * implementation of a `Task`.\n */")
trait TaskCtx extends Dest, Log, Args, Env, Workspace, Fork, Jobs, Offline, Fail

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

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

Attributes

Companion
object
Source
TaskCtx.scala
Supertypes
trait Fail
trait Offline
trait Jobs
trait Fork
trait Workspace
trait Env
trait Args
trait Log
trait Dest
class Object
trait Matchable
class Any
Show all
@Scaladoc(value = "/**\n * Provides access to various resources in the context of a current execution Target.\n */")
object TaskCtx

Provides access to various resources in the context of a current execution Target.

Provides access to various resources in the context of a current execution Target.

Attributes

Companion
trait
Source
TaskCtx.scala
Supertypes
class Object
trait Matchable
class Any
Self type
TaskCtx.type
@Scaladoc(value = "/**\n * A [[Module]] that has a [[defaultCommandName]] that will be automatically\n * executed if the module name is provide at the Mill command line\n */")
trait TaskModule extends Module

A Module that has a defaultCommandName that will be automatically executed if the module name is provide at the Mill command line

A Module that has a defaultCommandName that will be automatically executed if the module name is provide at the Mill command line

Attributes

Source
TaskModule.scala
Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
class Worker[+T](val inputs: Seq[Task[Any]], val evaluate0: (Seq[Any], TaskCtx) => Result[T], val ctx0: ModuleCtx, val isPrivate: Option[Boolean]) extends NamedTask[T]

Attributes

Source
Task.scala
Supertypes
trait NamedTask[T]
trait NamedTaskApi[T]
class Task[T]
trait TaskApi[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
object WorkspaceRoot

Attributes

Source
WorkspaceRoot.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Types

type Segment = Segment

Attributes

Source
Segment.scala

Attributes

Source
Segment.scala

Attributes

Source
package.scala

Value members

Concrete fields

val Segment: Segment.type

Attributes

Source
Segment.scala
val Segments: Segments.type

Attributes

Source
Segment.scala

Attributes

Source
package.scala