Mill: A Fast JVM Build Tool
Mill is a fast, scalable, multi-language build tool that supports Java, Scala, and Kotlin:
-
Mill can build the same Java codebase 4-10x faster than Maven, or 2-4x faster than Gradle
-
Mill’s typed config language and immutable task graph helps keep builds clean and understandable
-
Mill is an easier alternative to Bazel for large multi-language monorepos with hundreds of modules
To get started using Mill, see the language-specific introductory documentation linked below:
Why Mill?
Although the Java compiler is very fast and the Java language is easy to learn, JVM build tools have a reputation for being sluggish and confusing. Mill tries to offer a better alternative, letting your build system take full advantage of the Java platform’s performance and usability:
-
Performance: Mill’s build graph automatically caches and parallelizes build tasks, keeping your workflows fast and responsive. Mill adds minimal overhead over the logic necessary to build your project, and avoids the long configuration times often seen in other build tools like Gradle or SBT
-
Maintainability: Mill’s config and custom logic is written in concise type-checked code, with an immutable module tree and task graph. This catches config issues early, and helps both humans and IDEs (IntelliJ or VSCode) understand your Mill build better than any other build system
-
Flexibility: Mill’s tasks and modules allow anything from adding simple build steps, up to entire language toolchains. You can import any JVM library in your build, use Mill’s rich ecosystem of Third-Party Mill Plugins, or write plugins yourself and publish them to Maven Central for others to use.
For a quick introduction of why you may care about Mill, see the following page:
Or if you prefer a video introduction:
-
Video: Better Java Builds with the Mill Build Tool, Japan Java User Group Fall Conference Oct 2024
-
Video: Better Scala Builds with the Mill Build Tool, Scala.IO Paris Conference Nov 2024
Mill is used to build many real-world projects, such as the C3P0 JDBC Connection Pool, Coursier dependency resolver, Ammonite REPL, and the SpinalHDL and Chisel hardware design frameworks. Mill can be used for applications built on top of common JVM frameworks like Spring Boot (both in Java and in Kotlin), Micronaut, or Ktor.
Mill borrows ideas from other tools like Maven, Gradle, Bazel, but tries to learn from the strengths of each tool and improve on their weaknesses. For comparisons with existing build tools, check out these pages:
Contributing and Community
If you want to contribute to Mill, or are interested in the fundamental ideas behind Mill rather than the user-facing benefits discussed above, check out the page on 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:
To engage Mill with the community, you can use the channels below:
-
Scala Discord, in the
TOOLING#mill
channel
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
Commercial support and services related to Mill are available if you need help with training, adoption, or maintenance in your organization. Email info@mill-build.org with details on what you need and we can make an arrangement.