mill.api

package mill.api

Core language-agnostic Mill APIs for use in your build files to define Tasks, Modules, etc.

Attributes

Members list

Packages

package mill.api.daemon

Type members

Classlikes

final 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
object BuildCtx

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

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

Attributes

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

Attributes

Source
BuildInfo.scala
Supertypes
class Object
trait Matchable
class Any
Self type
BuildInfo.type
object Cross

Attributes

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

Models the different kinds of cross-versions supported by Mill for Scala dependencies.

Models the different kinds of cross-versions supported by Mill for Scala dependencies.

Attributes

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

Attributes

Companion
enum
Source
CrossVersion.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait DefaultTaskModule extends Module

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

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

Attributes

Source
DefaultTaskModule.scala
Supertypes
trait Module
trait ModuleApi
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 KspTests
trait KotestTests
trait MavenTests
trait SbtTests
trait ScalaTests
trait ScalaJSTests
trait BomModule
trait JlinkModule
trait MavenModule
trait RevapiModule
trait KtfmtModule
object KtfmtModule
trait KtlintModule
object KtlintModule
trait KotlinModule
trait DetektModule
trait KoverModule
trait KspModule
object PublishModule
trait TestModule
trait AndroidJUnit
trait Junit4
trait Junit5
trait Munit
trait ScalaCheck
trait ScalaTest
trait Specs2
trait TestNg
trait Utest
trait Weaver
trait ZioTest
Show all
final 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. Needs to be provided for every ExternalModule that you define.

Macro to walk the module tree and generate mainargs entrypoints for any Task.Command methods that it finds. Needs to be provided for every ExternalModule that you define.

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
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
final 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

An API that allows you to resolve, plan, and execute Mill tasks.

An API that allows you to resolve, plan, and execute Mill tasks.

Evaluator can be taken as a parameter to Task.Commands marked as exclusive = true, providing those commands with the ability to inspect the build and dynamically decide what to evaluate. Many builtin commands like show, plan, path, etc. are implemented in this way

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(var delegate0: () => Evaluator) extends Evaluator

Attributes

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

Attributes

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

Logic to resolve a Task's Segments to the various paths on disk owned by that task.

Logic to resolve a Task's Segments to the various paths on disk owned by that task.

Attributes

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

The output of executing tasks via an Evaluator

The output of executing tasks via an Evaluator

Attributes

Source
ExecutionResults.scala
Supertypes
class Object
trait Matchable
class Any
abstract class ExternalModule(implicit millModuleEnclosing0: Enclosing, millModuleLine0: Line, millFile0: File) extends RootModule0

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 RootModule0
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

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

Attributes

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

Attributes

Source
ModuleCtx.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ModuleCtx
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 RootModule0
class RootModule
object PmdModule
object Dependency
object PublishModule
object Kover
object KtfmtModule
object KtlintModule
object RuffModule
object VcsVersion
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 JavaModule
trait JavaTests
trait KotlinTests
trait KspTests
trait KotestTests
trait MavenTests
trait SbtTests
trait ScalaTests
trait ScalaJSTests
trait BomModule
trait JlinkModule
trait MavenModule
trait RevapiModule
trait KtfmtModule
trait KtlintModule
trait KotlinModule
trait DetektModule
trait KoverModule
trait KspModule
trait TestModule
trait AndroidJUnit
trait Junit4
trait Junit5
trait Munit
trait ScalaCheck
trait ScalaTest
trait Specs2
trait TestNg
trait Utest
trait Weaver
trait ZioTest
trait Wrap
trait BspModule
trait Wrap
trait PmdModule
trait RunModule
trait PythonModule
trait PythonTests
trait RuffModule
trait Pytest
trait Unittest
object kover
trait Wrap
trait Wrap
trait VcsVersion
Show all
object Module

Attributes

Companion
trait
Source
Module.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Module.type
trait ModuleCtx extends Nested

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

The contextual information provided to a mill.api.Module or mill.api.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
final 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
case class PathRef extends PathRefApi

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
trait PathRefApi
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
final class Plan

Represents the outcome of Mill planning: a MultiBiMap containing the transitive tasks upstream of the tasks selected by the user, grouped by the "terminal" named or selected task downstream of each group

Represents the outcome of Mill planning: a MultiBiMap containing the transitive tasks upstream of the tasks selected by the user, grouped by the "terminal" named or selected task downstream of each group

Attributes

Source
Plan.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

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

Utilities for managing and redirecting the SystemStreams modelling the stdin/stdout/stderr of the process

Utilities for managing and redirecting the SystemStreams modelling the stdin/stdout/stderr of the process

Attributes

Source
SystemStreamsUtils.scala
Supertypes
class Object
trait Matchable
class Any
Self type
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 Task.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 Anon[T]
trait Named[T]
class Command[T]
trait Simple[T]
class Computed[T]
class Input[T]
class Source
class Sources
class Worker[T]
Show all
object Task

Attributes

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

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

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

Attributes

Companion
trait
Source
TaskCtx.scala
Supertypes
class Object
trait Matchable
class Any
Self type
TaskCtx.type
final class TopoSorted

Represents the topologically sorted set of tasks

Represents the topologically sorted set of tasks

Attributes

Source
TopoSorted.scala
Supertypes
class Object
trait Matchable
class Any

Exports

Defined exports

Exported from daemon

Attributes

Source
exports.scala
Exported from daemon

Attributes

Source
exports.scala
Exported from daemon

Attributes

Source
exports.scala
final val ExecResult: ExecResult
Exported from daemon

Attributes

Source
exports.scala
final type ExecResult = ExecResult
Exported from daemon

Attributes

Source
exports.scala
Exported from daemon

Attributes

Source
exports.scala
final val Logger: Logger
Exported from daemon

Attributes

Source
exports.scala
final type Logger = Logger
Exported from daemon

Attributes

Source
exports.scala
Exported from daemon

Attributes

Source
exports.scala
Exported from daemon

Attributes

Source
exports.scala
Exported from daemon

Attributes

Source
exports.scala
final type ProxyLogger = ProxyLogger
Exported from daemon

Attributes

Source
exports.scala
final val Result: Result
Exported from daemon

Attributes

Source
exports.scala
final type Result = Result
Exported from daemon

Attributes

Source
exports.scala
final val Segment: Segment
Exported from daemon

Attributes

Source
exports.scala
final type Segment = Segment
Exported from daemon

Attributes

Source
exports.scala
final val Segments: Segments
Exported from daemon

Attributes

Source
exports.scala
final type Segments = Segments
Exported from daemon

Attributes

Source
exports.scala
final val SelectMode: SelectMode
Exported from daemon

Attributes

Source
exports.scala
final type SelectMode = SelectMode
Exported from daemon

Attributes

Source
exports.scala
Exported from daemon

Attributes

Source
exports.scala
Exported from daemon

Attributes

Source
exports.scala
final type Val = Val
Exported from daemon

Attributes

Source
exports.scala
final val Watchable: Watchable
Exported from daemon

Attributes

Source
exports.scala
final type Watchable = Watchable
Exported from daemon

Attributes

Source
exports.scala
final type experimental = experimental
Exported from daemon

Attributes

Source
exports.scala