Mill is a build tool that tries to improve upon the tools traditionally used in the JVM ecosystem:
-
Mill builds the same Java project 3-6x faster than Maven or Gradle due to aggressive caching & parallelism
-
Mill’s rich featureset means less fiddling with plugins, since everything needed for development is built in
-
Mill builds are easily explorable in your IDE, letting you work on them without constantly googling for help
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, its object-oriented builds reducing the learning curve and letting your build system take full advantage of the Java platform’s performance, usability, and IDE support.
If you want to use Mill in your own projects, check out our documentation:
Here is some quick example, so that you can imagine how it looks:
package build
import mill._, javalib._
object foo extends JavaModule {
def mvnDeps = Seq(
mvn"net.sourceforge.argparse4j:argparse4j:0.9.0",
mvn"org.thymeleaf:thymeleaf:3.1.1.RELEASE"
)
object test extends JavaTests, TestModule.Junit4 {
def mvnDeps = Seq(
mvn"com.google.guava:guava:33.3.0-jre"
)
}
}
> ./mill foo.compile # compile sources into classfiles
...
compiling 1 Java source to...
> ./mill foo.run --text hello
<h1>hello</h1>
> ./mill foo.test
...
Test foo.FooTest.testEscaping finished, ...
Test foo.FooTest.testSimple finished, ...
Test run foo.FooTest finished: 0 failed, 0 ignored, 2 total, ...