.. | |||
example | 1 month ago | ||
src/main/scala/works/iterative/ mill | 1 month ago | ||
README.md | 1 month ago | ||
build.sc | 1 month ago |
This library provides support for using Mill build tool with Iterative Works standards and best practices. It's equivalent to our SBT infrastructure (sbt-iw-projects and sbt-iw-plugin-presets) but for Mill.
Centralized version management for all libraries:
import works.iterative.mill.IWMillVersions // Access specific versions val zioVersion = IWMillVersions.zio // "2.1.16"
Standardized dependency management with proper versioning:
import works.iterative.mill.IWMillDeps // Use individual dependencies IWMillDeps.zio // ivy"dev.zio::zio:2.1.16" IWMillDeps.zioJson // ivy"dev.zio::zio-json:0.7.36" IWMillDeps.tapirCore // ivy"com.softwaremill.sttp.tapir::tapir-core:1.11.16" // Use dependency groups IWMillDeps.useZIO() // Core ZIO dependencies with test framework IWMillDeps.useZIOAll() // Comprehensive ZIO stack
Standard module configuration for Scala projects:
import mill._ import works.iterative.mill._ object myProject extends IWScalaModule { // Use default Scala version (3.6.3) // and standard compiler options with SemanticDB enabled def ivyDeps = super.ivyDeps() ++ IWMillDeps.useZIO() // Standard test module configuration object test extends Tests with IWTests }
Standard publishing configuration for IW Maven repositories:
import mill._ import mill.scalalib.publish._ import works.iterative.mill._ object myProject extends IWScalaModule with IWPublishModule { def publishVersion = "0.1.0-SNAPSHOT" def pomSettings = PomSettings( description = "My Project", organization = "works.iterative", url = "https://github.com/iterative-works/my-project", licenses = Seq(License.MIT), versionControl = VersionControl.github("iterative-works", "my-project"), developers = Seq( Developer("dev", "Developer Name", "https://github.com/dev") ) ) // publishTo is automatically configured based on version // (snapshots vs releases) }
Add the library to your build.sc
file:
import $ivy.`works.iterative::mill-iw-support:0.1.0-SNAPSHOT` import works.iterative.mill._
Then extend the appropriate traits in your module definitions:
object root extends IWScalaModule with IWPublishModule { // ... configuration ... }
See the example
directory for a complete working example.