Mill Scala Build Tool

Mill Scala Build Tool

github.com

2

About this website

Mill is a free and open-source build tool for Scala and Java projects that aims to be a faster, simpler, and more robust alternative to SBT (Simple Build Tool). Created by Li Haoyi (also the creator of Ammonite, FastParse, and the OS-Lib library) in 2018 and written in Scala, Mill addresses SBT's complexity, slow startup, and confusing configuration by providing a more straightforward and predictable build system. Key features: fast startup: Mill uses a background daemon process (Mill server) that keeps the JVM warm, reducing subsequent build times from seconds to milliseconds. The first invocation starts the server; subsequent invocations connect to the already-running server. Scala-based configuration: build definitions are written in plain Scala files (build.sc) using Mill's module API. Each module defines targets (JavaModule, ScalaModule, TestModule) with configurable source directories, dependencies, scalacOptions, and tasks. The configuration is type-safe, IDE-supported, and debuggable. Task-based: Mill organizes builds as a graph of tasks, where each task is a cached function. Tasks can depend on other tasks, and Mill automatically caches results and only re-runs tasks whose inputs changed. This incremental computation model ensures fast and correct builds. Module system: projects are organized into modules with inheritance. A ScalaModule can extend a JavaModule, adding Scala-specific configuration. Cross-module dependencies are explicit. Module cross-publishing for multiple Scala versions (crossScalaVersions). Integration: built-in support for Scala 2 and Scala 3, Java, Kotlin, and TypeScript. Dependencies from Maven Central, Ivy repositories, or local JARs. Testing: integration with UTest, MUnit, ScalaTest, and JUnit. Code generation: define custom tasks that generate source code. Assembly: fat JAR packaging with customizable merge strategy. Docker: build Docker images. Cross-platform (requires JVM). MIT.

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!