mill.define

package mill.define

Members list

Packages

Type members

Classlikes

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

Attributes

Source
Task.scala
Supertypes
class Task[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

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 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], Ctx) => Result[T], val ctx0: Ctx, val writer: Writer[_], val isPrivate: Option[Boolean], val exclusive: Boolean) extends NamedTask[T]

Attributes

Source
Task.scala
Supertypes
trait NamedTask[T]
class Task[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 Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
@Scaladoc(value = "/**\n * The contextual information provided to a [[mill.define.Module]] or [[mill.define.Task]]\n */")
trait Ctx 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
Ctx.scala
Supertypes
trait Nested
class Object
trait Matchable
class Any
object Ctx extends LowPriCtx

Attributes

Companion
trait
Source
Ctx.scala
Supertypes
trait LowPriCtx
class Object
trait Matchable
class Any
Self type
Ctx.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 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

Attributes

Companion
object
Source
Evaluator.scala
Supertypes
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
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
ExecResults.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 */")
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

Attributes

Source
ExternalModule.scala
Supertypes
class BaseModule
trait Module
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
class InputImpl[T](val evaluate0: (Seq[Any], Ctx) => Result[T], val ctx0: Ctx, val writer: Writer[_], val isPrivate: Option[Boolean]) extends Target[T]

Attributes

Source
Task.scala
Supertypes
trait Target[T]
trait NamedTask[T]
class Task[T]
trait Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
class SourceImpl
class SourcesImpl
final class Lazy[T](t: () => T)

Attributes

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

Attributes

Source
Ctx.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Ctx
@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

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 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 Giter8Module
object Dependency
object PublishModule
trait MainModule
class RootModule
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 AndroidJUnit
trait Junit4
trait Junit5
trait Munit
trait ScalaTest
trait Specs2
trait TestNg
trait Utest
trait Weaver
trait ZioTest
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 * 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]

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
class Task[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
sealed trait Segment

Attributes

Companion
object
Source
Segment.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Cross
class Label
object Segment

Attributes

Companion
trait
Source
Segment.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Segment.type
@Scaladoc(value = "/**\n * Models a path with the Mill build hierarchy, e.g. `amm.util[2.11].test.compile`.\n *\n * `.`-separated segments are [[Segment.Label]]s,\n * while `[]`-delimited segments are [[Segment.Cross]]s\n */")
case class Segments

Models a path with the Mill build hierarchy, e.g. amm.util[2.11].test.compile.

Models a path with the Mill build hierarchy, e.g. amm.util[2.11].test.compile.

.-separated segments are Segment.Labels, while []-delimited segments are Segment.Crosss

Attributes

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

Attributes

Companion
class
Source
Segments.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Segments.type
sealed trait SelectMode

Attributes

Companion
object
Source
SelectMode.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Multi
object Separated
object SelectMode

Attributes

Companion
trait
Source
SelectMode.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
SelectMode.type
class SourceImpl(evaluate0: (Seq[Any], Ctx) => Result[PathRef], ctx0: Ctx, isPrivate: Option[Boolean]) extends InputImpl[PathRef]

Attributes

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

Attributes

Source
Task.scala
Supertypes
class InputImpl[Seq[PathRef]]
trait Target[Seq[PathRef]]
trait NamedTask[Seq[PathRef]]
class Task[Seq[PathRef]]
trait Applyable[Task, Seq[PathRef]]
class Ops[Seq[PathRef]]
class Object
trait Matchable
class Any
Show all
@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]
class Task[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], Ctx) => Result[T], val ctx0: Ctx, val readWriter: ReadWriter[_], val isPrivate: Option[Boolean], val persistent: Boolean) extends Target[T]

Attributes

Source
Task.scala
Supertypes
trait Target[T]
trait NamedTask[T]
class Task[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 */")
abstract class Task[+T] extends Ops[T], Applyable[Task, 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 Applyable[Task, T]
class Ops[T]
class Object
trait Matchable
class Any
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 * 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 Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
trait JavaModule
trait JavaTests
trait KotlinTests
trait KotestTests
trait KspTests
trait MavenTests
trait SbtTests
trait ScalaTests
trait ScalaJSTests
trait KtfmtModule
object KtfmtModule
trait KotlinModule
trait DetektModule
trait KoverModule
trait KspModule
trait BomModule
trait JlinkModule
trait MavenModule
trait SbtModule
trait ScalaModule
trait UnidocModule
trait TestModule
trait AndroidJUnit
trait Junit4
trait Junit5
trait Munit
trait ScalaTest
trait Specs2
trait TestNg
trait Utest
trait Weaver
trait ZioTest
Show all
class Worker[+T](val inputs: Seq[Task[Any]], val evaluate0: (Seq[Any], Ctx) => Result[T], val ctx0: Ctx, val isPrivate: Option[Boolean]) extends NamedTask[T]

Attributes

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