Mill: A Better JVM Build Tool
Mill is a JVM build tool that supports Java, Scala, and Kotlin:
-
Mill builds the same Java project 3-6x faster than Maven or Gradle due to aggressive caching & parallelism
-
Mill has better IDE support than other build tools, with superior autocomplete and navigation in IntelliJ
-
Mill builds require fewer plugins for common workflows, and are easier to extend with custom tasks
To get started using Mill for the first time, or migrating and existing JVM codebase (built using Maven, Gradle, or SBT) to Mill, see:
Or 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 automatically caches and parallelizes build tasks and tests to keep local development fast, incrementally builds assembly jars to speed up manual testing workflows, and shortens CI times with selective test execution to only runs the subset of tests necessary to validate a code change.
-
Builtins: Mill has builtin support for most common workflows: not just compile/run/test, but also managing JVM versions, linting, publishing, building executable assemblies, native binaries or installers, etc. This lets you focus on your actual project and spend less time fiddling with tooling and plugins.
-
Maintainability: Mill’s config and custom logic is written in concise type-checked JVM 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.
-
Scalability Mill scales well from small projects to large monorepos with hundreds of modules and multiple languages. Even projects with hundreds or thousands of sub-modules can be handled performantly and with minimal overhead.
For a quick introduction of why you may care about Mill, see:
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, Functional Scala Conference Dec 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:
Feature, Tool, & Framework Support
Mill supports most common JVM development workflows and tools built in, so you can get very far before you need to reach for third-party plugins or write custom code to extend your build pipelines. The table below links to the relevant part of the documentation and examples for each tool:
Languages Dependency Management Testing Linting |
Packaging Publishing Web Frameworks Others |
When the time comes that you do need something not in its builtin feature set, Mill also has a rich ecosystem of third party plugins for less common use cases:
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.