Skip to content

kierendavies/mill-explicit-deps

Repository files navigation

mill-explicit-deps

A Mill plugin for enforcing explicit dependencies. Inspired by sbt-explicit-dependencies.

It allows you to check that ivyDeps and ivyCompileDeps accurately reflect the direct dependencies of your source code.

Quickstart

Import the plugin in your build.sc:

import $ivy.`io.github.kierendavies::mill-explicit-deps::0.2.0`
import io.github.kierendavies.mill.explicitdeps.ExplicitDepsModule

Use the mixin:

object foo extends ScalaModule with ExplicitDepsModule {
    // ...
}

Then you can run the command mill -k __.checkExplicitDeps. It will fail if it finds any transitive dependencies which are either

  • imported by a source file but not declared (in ivyDeps or compileIvyDeps), or
  • declared but not imported by any source files.

Compatibility

This plugin requires Mill 0.10.

It has been tested with Scala 2.13.10 and 3.2.1.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages