Contrib Plugins

The plugins in this section are hosted in the Mill git tree and developed / maintained by the community.

For details about including plugins in your build.mill read Using Mill Plugins.

When using one of these contribution modules, it is important that the versions you load match your mill version. To facilitate this, Mill will automatically replace the $MILL_VERSION literal in your ivy imports with the correct value. You can also leave the version completely empty to default to the mill version (but don’t forget to keep the trailing colon).

For instance:

import $ivy.`com.lihaoyi::mill-contrib-bloop:$MILL_VERSION`

or

import $ivy.`com.lihaoyi::mill-contrib-bloop:`

Importing Contrib Modules

build.mill (download, browse)
package build
import mill._, scalalib._
import $ivy.`com.lihaoyi::mill-contrib-buildinfo:`
import mill.contrib.buildinfo.BuildInfo

object foo extends ScalaModule with BuildInfo {
  def scalaVersion = "2.13.10"
  def buildInfoPackageName = "foo"
  def buildInfoMembers = Seq(
    BuildInfo.Value("scalaVersion", scalaVersion()),
  )
}

This example illustrates usage of Mill contrib plugins. These are Mill plugins contributed by Mill user that are maintained within the Mill repo, published under mill-contrib-*.

> mill foo.run
...
foo.BuildInfo.scalaVersion: 2.13.10