= Mill: A Better Build Tool for Java, Scala, & Kotlin

https://github.com/com-lihaoyi/mill/blob/main/changelog.adoc[image:https://img.shields.io/maven-central/v/com.lihaoyi/mill-dist?label=stable-version&versionSuffix={mill-version}[d]]
https://central.sonatype.com/artifact/com.lihaoyi/mill-dist[image:https://img.shields.io/maven-central/v/com.lihaoyi/mill-dist?label=unstable-dev-version[Maven Central Version]]
https://github.com/com-lihaoyi/mill[image:https://img.shields.io/github/stars/com-lihaoyi/mill[GitHub Repo stars]]


Mill is a build tool that improves upon the tools traditionally used
in the JVM ecosystem:

* **xref:comparisons/maven.adoc[Simpler than Maven]**, with declarative `build.mill.yaml` files
often 1/10th the lines of a `pom.xml`

* **xref:comparisons/gradle.adoc[Easier than Gradle]** or SBT, with
object-oriented builds any developer can intuitively understand

* **xref:comparisons/performance.adoc[Fastest builds on the JVM]**, 3-7x
faster than Maven or Gradle due to aggressive caching & parallelism

Although the Java compiler is very fast and the Java language is easy to learn, JVM build
tools have a reputation for being sluggish, complicated, and confusing. Mill tries to offer
a better alternative that gives the Java platform the developer experience it deserves.

For detailed comparisons with other build tools, check out these pages:

[cols="1a,1a"]
|===
| xref:comparisons/maven.adoc[image:index/maven.png[maven,24] Mill vs Maven]
| xref:comparisons/gradle.adoc[image:index/gradle.svg[gradle,32] Mill vs Gradle]
|===


=== Performance

Mill automatically xref:depth/caching.adoc[caches]
and xref:depth/parallelism.adoc[parallelizes build tasks] and https://mill-build.org/blog/11-jvm-test-parallelism.html[tests]
to keep local development fast, uses a xref:depth/process-architecture.adoc[long-lived daemon] to keep the JVM warm,
and shortens CI times with xref:large/selective-execution.adoc[selective test execution]. Play the
video below to compare compiling the same 500,000 line Netty codebase with Mill (~11s) vs Maven (~60s)

:cast-file: _images/basic/MillMavenComparison.cast
include::partial$Asciinema_Comparison.adoc[]

=== Simplicity

Mill's xref:javalib/intro.adoc#_declarative_configuration[declarative
build.mill.yaml files] contain only the essence of what you want to configure in
your build, stripping away the endless complexity in traditional JVM build tools to
make your project configuration easy to write, easy to read, and easy to understand

[cols="3a,5a"]
|===
| Mill `build.mill.yaml`
```yaml
extends: JavaModule
mvnDeps:
- org.jsoup:jsoup:1.7.2
- org.slf4j:slf4j-nop:2.0.7
```
| Maven `pom.xml`
```xml
<project xmlns="..." xmlns:xsi="...">
  <modelVersion>4.0.0</modelVersion>
  <groupId>example</groupId>
  <artifactId>html-scraper</artifactId>
  <version>1.0</version>
  <dependencies>
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
      <version>1.17.2</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-nop</artifactId>
      <version>2.0.7</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <mainClass>HtmlScraper</mainClass>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
```
|===

=== Builtins

Mill supports most JVM development workflows built in. This removes the need to
fiddle with plugins or install separate tools such as https://sdkman.io/[SdkMan]
or https://www.jenv.be/[Jenv] just to get your project up and running. The example build file
below shows how Mill handles many of the common settings that often need to be configured in
a build tool:

```yaml
extends: [JavaModule, PublishModule]

mvnDeps:
- org.thymeleaf:thymeleaf:3.1.1.RELEASE
- org.slf4j:slf4j-nop:2.0.7

repositories: [https://oss.sonatype.org/content/repositories/releases]

mainClass: foo.Foo2

jvmVersion: 11 # Pin a specific JVM version, downloaded and cached automatically

# Add additional source and resource folders
sources: !append [custom-src/]
resources: !append [custom-resources/]

# Configure java compiler and runtime options and env vars
javacOptions: [-deprecation]
forkArgs: [-Dmy.custom.property=my-prop-value]
forkEnv: { MY_CUSTOM_ENV: my-env-value }

# Settings to publish to Maven Central
publishVersion: 0.0.1
artifactName: example
pomSettings:
  description: Example
  organization: com.lihaoyi
  url: https://github.com/com.lihaoyi/example
  licenses: [MIT]
  versionControl: https://github.com/com.lihaoyi/example
  developers: [{name: Li Haoyi, email: example@example.com}]
```

Beyond this example, the table below links to the relevant part of the
documentation and examples for each feature or tool that Mill supports:

include::partial$Feature_Support.adoc[]


Mill can be used for applications built on top of common JVM frameworks like
Spring Boot (both xref:javalib/spring-boot.adoc[in Java]
and xref:kotlinlib/web-examples.adoc#_spring_boot_todomvc_app[in Kotlin]),
xref:javalib/web-examples.adoc#_micronaut_todomvc_app[Micronaut],
xref:kotlinlib/web-examples.adoc#_ktor_todomvc_app[Ktor], or
xref:scalalib/web-examples.adoc#_todomvc_http4s_web_app[Http4s].
It is used in the wild to build many real-world projects, such as:

* https://github.com/swaldman/c3p0/blob/0.11.x/build.mill[C3P0 JDBC Connection Pool]
* https://github.com/coursier/coursier/blob/main/build.mill[Coursier dependency resolver]
* https://github.com/com-lihaoyi/Ammonite[Ammonite REPL]
* https://github.com/SpinalHDL/SpinalHDL[SpinalHDL] and https://github.com/chipsalliance/chisel/blob/main/build.mill[Chisel] chip design frameworks
* Projects at https://youtu.be/FckU1aHNh8U?t=2451[Netflix],
https://github.com/disneystreaming/smithy-translate/blob/main/build.sc[Disney-Streaming],
and other organizations

=== Getting Started

To get started using Mill for the first time, or migrating an existing JVM
codebase (built using Maven, Gradle, or SBT) to Mill, see:

[cols="1a,1a"]
|===
| * xref:cli/installation-ide.adoc[] | * xref:migrating/migrating.adoc[]
|===

Or see the language-specific introductory documentation linked below:

[cols="1a,1a,1a"]
|===
| xref:javalib/intro.adoc[image:index/iconscout-java.svg[java,32] Java with Mill]
| xref:scalalib/intro.adoc[image:index/iconscout-scala.svg[scala,20] Scala with Mill]
| xref:kotlinlib/intro.adoc[image:index/iconscout-kotlin.svg[kotlin,28] Kotlin with Mill]
|===

=== Commercial Support

Commercial support and services related to Mill are available if you need help with
training, adoption, or maintenance in your organization. Contact us at:

* info@mill-build.org

Email us with details on what you need and we can make an arrangement.

=== Community


To engage with the Mill community, you can use the channels below:

* https://github.com/com-lihaoyi/mill/discussions[Mill Github Discussions]
* https://discord.com/invite/scala[Scala Discord], in the `TOOLING#mill` channel

If you prefer a video introduction to Mill, see:

* https://www.youtube.com/watch?v=-DTYm1qhQ6U[Video: Engineering a Better Java Build Tool Experience],
Berlin Expert Days 8 Oct 2025
* https://www.youtube.com/watch?v=tNsz_dGCsVs[Video: Simpler Build Tools with Functional and Object Oriented Programming], Scala Workshop 13 Oct 2025


=== Contributing

If you want to contribute to Mill, or are interested in the fundamental ideas behind
Mill rather than the user-facing features discussed above, check out the page on
xref:depth/design-principles.adoc[Mill Design Principles]. In particular, this video
is a must-watch to help you understand the fundamental concepts behind Mill and why
they are interesting:

* https://www.youtube.com/watch?v=UsXgCeU-ovI[Video: A Deep Dive into the Mill Build Tool]

Mill maintains an open list of issue bounties below, with payouts ranging from
500USD to 3000USD per issue. Feel free to look through the list and try your
hand at any bounties that may interest you

* https://github.com/orgs/com-lihaoyi/discussions/6[Open Issue Bounties]
